Using ISO padding?
Closed this issue · 2 comments
AKushWarrior commented
The README notes state that you can use ISO7816-4 as a padding. How would this be achieved with AES?
My code currently looks like this to encrypt:
var key = utf8.encode(key32);
var ivLocal = utf8.encode(iv);
CipherParameters params = PaddedBlockCipherParameters(ParametersWithIV(KeyParameter(key), ivLocal), null);
PaddedBlockCipherImpl cipherImpl = PaddedBlockCipherImpl(Padding('ISO7816-4'), CBCBlockCipher(AESFastEngine()));
cipherImpl.init(true, params);
return cipherImpl.process(utf8.encode(input));
I know this package is mostly inactive, but could anyone help me out?
AKushWarrior commented
Note: key, ivLocal, and input are all parameters for the helper function above.
AKushWarrior commented
Never mind, figured it out. You need to import the github instead of the pub version.