New answers tagged

3

Actually, that is depending on the padding applied. Maybe there is no padding at all. The implementation defines the padding applied. Check the code or documentation! The last 22, at first, indicates that might be PKCS#5 or PKCS#7 since PKCS#7 most common with CBC implementations. While PKCS#5 is limited to 8 bytes like DES, PKCS#7 works from 1 to 256 bytes....


0

Is your "-K" in the code in uppercase or lowercase? If it is in lowercase, the encryption will automatically add a salt value into your cipher text, causing it to have more than 32 bytes. CBC will pad it until it reaches 48 bytes later(the multiplication of 16).


Top 50 recent answers are included