cryptography icon indicating copy to clipboard operation
cryptography copied to clipboard

How can I decrypt from AES/CBC/PKCS5Padding ?

Open saifudin opened this issue 4 years ago • 0 comments

Hi.. i can encrypt and decrypt normally with this Lib using AesCbc.with256bits(macAlgorithm: Hmac.sha256());. The class AesCbc uses the same padding as Web Crypto API, which is PKCS7. but, my existing system using PKCS5Padding when and i tried to decrypt Unhandled Exception: Bad state: The decrypted bytes have invalid PKCS7 padding length in the end: 198 from DartAesCbc.decrypt (package:cryptography/src/dart/aes_cbc.dart:142:7) any suggestion what should i do? thanks before.

saifudin avatar May 17 '21 15:05 saifudin