You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
Hi, I have been trying to use "asmCrypto.AES_CBC.encrypt" function with the a 256 bit key and a varying length of data (since data cannot be limited and will be varying depending on request)
I was getting below error alot of time while invoking this:
data length must be a multiple of the block size
And upon debug realized that the AES_Encrypt_finish function has a defined variable plen = 16 and raises the issue in code below:
else if ( len % 16 ) { throw new IllegalArgumentError("data length must be a multiple of the block size"); }
The text was updated successfully, but these errors were encountered:
I am not sure if it helps but I had a similar issue with the same error and resolved it by enabling padding.
Both the AES-CBC encryption and decryption have the padding flag in their constructor.
Hi, I have been trying to use "asmCrypto.AES_CBC.encrypt" function with the a 256 bit key and a varying length of data (since data cannot be limited and will be varying depending on request)
I was getting below error alot of time while invoking this:
data length must be a multiple of the block size
And upon debug realized that the AES_Encrypt_finish function has a defined variable plen = 16 and raises the issue in code below:
else if ( len % 16 ) { throw new IllegalArgumentError("data length must be a multiple of the block size"); }
The text was updated successfully, but these errors were encountered: