is it normal to get the junk bytes at end of buffer when this function returns?
+1
A:
If you're using a block cipher, it's normal for the output to be padded to a multiple of the block size. With a stream cipher, the result will normally be exactly the same length as the input.
Jerry Coffin
2009-10-19 20:54:12
for example, the block size of AES256 is 128 bits, does that mean i would get 16 junk bytes at the end of cipherblock?
Dave18
2009-10-19 21:11:58
You'd get back 16 bytes at most -- it could be less.
Jerry Coffin
2009-10-19 22:29:49