-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: invalid plaintext size (must be multiple of 16 bytes) #89
Comments
CBC Operates against blocks, so the data length must be a multiple of 16. See the CBC section here: https://en.m.wikipedia.org/wiki/Block_cipher_mode_of_operation Hope this helps. :) |
How to solve this problem, I also encountered this pit |
I don't know how to use it gracefully.Please help me write a better code. |
But when I'm using ECB mode, this error occurs too. |
Perhaps Cipher Text Stealing should be implemented in CBC mode, to support arbitrary plaintext lengths: |
use the below functions, it will help in this issue aesjs.padding.pkcs7.pad() |
aes-js version: 3.1.2.
why should the length of plaintext in CBC be 16?
The text was updated successfully, but these errors were encountered: