bcgit / pc-dart

Pointy Castle - Dart Derived Bouncy Castle APIs
MIT License
237 stars 122 forks source link

Incorrect blockSize for AES/CBC examples #144

Closed wangjiejacques closed 2 years ago

wangjiejacques commented 2 years ago

In both the aes-cbc-registry.dart, aes-cbc-direct.dart, they use 128 as the pad blockSize,

pad(utf8.encode(textToEncrypt) as Uint8List, 128));

But this is incorrect, the blockSize for AES should be 16.

mwcw commented 2 years ago

Hi,

Thanks this has been fixed and will be merged shortly.

MW