Closed YDJSZY closed 4 years ago
I encrypt data then send it to server, the server return success and other encrypt data,but I decrypt fail. var iv = xxx; var key = xxx; var aesEncrypter = AesCrypt(key, 'cbc', 'pkcs7'); String encrypted = aesEncrypter.encrypt(data, iv) Map postData = { "params": encrypted, xxx, xxx }; var res = await request.login(postData); final myResData = aesEncrypter.decrypt(res, iv); throw error Invalid or corrupted pad block. I don‘t know what's wrong
Can you give me a favor ? I don‘t know what's wrong...
I don't know what is wrong either ;)
Can you give me an example set of data (with IV, realtext, key, and ciphertext)?
I can't look at what's going wrong without some actual data sets to work with.
I'll reopen if you can provide data.
Could you provide any more context? I assume you're using AESCrypt(). What arguments did you pass?