Closed lumia1999 closed 4 years ago
I'd suppose you need to set third parameter as 'none' in AesCrypt() constructor. (it's from sources).
DON'T use @alexgoussev's answer. The source code is a little ambiguous, but 'none' is not a valid option and will lead to unpredictable behavior.
Refer to my answer in #6. It's the same issue (with ECB instead of CBC), and provides a nice explanation of why padding is necessary.
The summary version of it:
String data = 'DataGoesHereLike'; //some data
assert(data.codeunits.length % 16 == 0)
If that assert statement evaluates to 'true', it doesn't matter what you put in the padding parameter: the encrypted data will be the same regardless.
Lemme know if you have more issues
aes how to set 'zeropadding' in 'cbc' mode?