| Constructor and Description |
|---|
PKCS5Padding(int blockSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
padLength(int len)
Determines how long the padding will be for a given input length.
|
void |
padWithLen(byte[] in,
int off,
int len)
Adds the given number of padding bytes to the data input.
|
int |
unpad(byte[] in,
int off,
int len)
Returns the index where the padding starts.
|
public int padLength(int len)
public void padWithLen(byte[] in,
int off,
int len)
throws ShortBufferException
padWithLen in interface Paddingin - the input buffer with the data to padoff - the offset in in where the padding bytes are appendedlen - the number of padding bytes to addShortBufferException - if in is too small to hold the padding bytespublic int unpad(byte[] in,
int off,
int len)
Given a buffer with padded data, this method returns the index where the padding starts.