public interface Padding
PKCS5Padding| 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 padding starts.
|
int padLength(int len)
len - the length of the data to padvoid padWithLen(byte[] in,
int off,
int len)
throws ShortBufferException
in - 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 bytesint unpad(byte[] in,
int off,
int len)
Given a buffer with data and their padding, this method returns the index where the padding starts.
in - the buffer with the data and their paddingoff - the offset in in where the data startslen - the length of the data and their padding