Class PKCS7Padding
Implements PKCS7 cipher padding.
public class PKCS7Padding : CipherPadding
- Inheritance
-
PKCS7Padding
- Inherited Members
Constructors
PKCS7Padding()
public PKCS7Padding()
Methods
Pad(byte[], int, int, int)
Pads the specified input with a given number of bytes.
public override byte[] Pad(byte[] input, int offset, int length, int paddinglength)
Parameters
input
byte[]The input.
offset
intThe zero-based offset in
input
at which the data to pad starts.length
intThe number of bytes in
input
to take into account.paddinglength
intThe number of bytes to pad the input with.
Returns
- byte[]
The padded data array.
Pad(int, byte[], int, int)
Pads the specified input to match the block size.
public override byte[] Pad(int blockSize, byte[] input, int offset, int length)
Parameters
blockSize
intThe size of the block.
input
byte[]The input.
offset
intThe zero-based offset in
input
at which the data to pad starts.length
intThe number of bytes in
input
to take into account.
Returns
- byte[]
The padded data array.