Originally Posted by
nanaji
How to know ,how many padding bytes added to encrypt the block. I believe that pkcs5# add the padding bytes to encrypt.
I read up on it not too long ago, the cipher always gets padded out to a predictable number. How much depends on the cipher. You have to read up on each cipher, but if the padding comes in as zero then the full padding amount is tacked on. That way the receiver can always expect at least one padding byte, which is defined for each cipher.
I found Jason Weiss book to be telling.
Originally Posted by
nanaji
I just want to check , is there methods to check how many padding bytes added ?
Read the docs for the cipher class you are using .