Class NoPadding
- java.lang.Object
-
- com.fortanix.sdkms.jce.provider.paddings.NoPadding
-
-
Constructor Summary
Constructors Constructor Description NoPadding(int blockSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()intgetPaddingLength(int inputLength)voidpad(ByteArrayOutputStream in)Adds the given number of padding bytes to the data input.byte[]unpad(byte[] in)Returns the index where the padding starts.
-
-
-
Method Detail
-
pad
public void pad(ByteArrayOutputStream in)
Adds the given number of padding bytes to the data input. The value of the padding bytes is determined by the specific padding mechanism that implements this interface.- Specified by:
padin interfaceIPadding- Parameters:
in- the input buffer with the data to padoff- the offset ininwhere the padding bytes are appendedlen- the number of padding bytes to add- Throws:
ShortBufferException- ifinis too small to hold the padding bytes
-
unpad
public byte[] unpad(byte[] in)
Returns the index where the padding starts.Given a buffer with padded data, this method returns the index where the padding starts.
-
getPaddingLength
public int getPaddingLength(int inputLength)
- Specified by:
getPaddingLengthin interfaceIPadding
-
-