Closed sairathb closed 4 years ago
It is necessary to call setIV() again to reset the initialisation vector back to the state at the start of the packet before calling decrypt(). Otherwise it will decrypt starting with the IV state at the end of the packet.
The CBC code is in the CryptoLegacy library. I moved it out of the core Crypto library because CBC isn't recommended for modern designs.
Hi, thanks for the library, it is a big help in my project. I am trying to perform a AES256 encryption and exchange data with a mobile app build using react native and I tried just AES256, CTR and CBC. The AES256 is able to encrypt and decrypt a block properly. However, when I am trying the same block with CTR/CBC mode, the decryption is not returning the same plain text. The code I am using is as follows:
The CBC code is not directly in this repo, but I found the .cpp and .h file in the documentation. I copied them and tried to use it. Can you please guide me in this issue. Please let me know if you need more input from my end.
Thanks