views:

122

answers:

1

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
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
You'd get back 16 bytes at most -- it could be less.
Jerry Coffin