public static class SM4CbcPkeyCipherV1.PKCS5Padding extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
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 void 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 bytespublic int unpad(byte[] in,
int off,
int len)
Given a buffer with padded data, this method returns the index where the padding starts.
in - the buffer with the padded dataoff - the offset in in where the padded data startslen - the length of the padded datapublic int padLength(int len)
len - the length of the data to padCopyright © 2022. All rights reserved.