Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to use AES 128 ECB algorithm in securing message files. I have tried all the solutions available on the internet. But when I do manual calculations the results are different.Anyone have any code regarding this please share it with me that would be an great help to me.
C++



What I have tried:

I have download Encrypt/Decrypt Files in VB.NET (Using Rijndael) but that program 256 bit.and i try to swap the variable it stays wrong too.
Posted
Updated 7-Nov-20 20:43pm

1 solution

See remark here: Aes128.Encrypt Method (String, String, Mode, String)[^]
For ECB and CBC modes, the length of the decoded input bytes must be an exact multiple of the block length (16 bytes).
The examples seem to be for the CryptoSys cryptography software tools[^]

Here is a CodeProject article using C# and Java: Symmetric Key Encryption by AES[^]

But it is best not to use 128 bit ECB encryption, see warning here: block cipher - Why shouldn't I use ECB encryption? - Cryptography Stack Exchange[^]
 
Share this answer
 
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900