Cipher.Pad Method (Byte[], CipherAlgorithm, Padding)
Pad byte array to correct length for ECB and CBC encryption.
Syntax
[C#]
public static byte[] Pad(
byte[] input,
CipherAlgorithm cipherAlg,
Padding pad
)
[VB.NET]
Public Shared Function Pad ( _
input As Byte(), _
cipherAlg As CipherAlgorithm, _
pad As Padding _
) As Byte()
Parameters
- input
- Data to be padded
- cipherAlg
- Type: CipherAlgorithm
Block cipher being used
- pad
- Type: Padding
Padding method to use (default is PKCS#5/#7)
Return Value
Padded data in byte array
See Also
VB6/C equivalent: PAD_BytesBlock
[Contents] [Index]