Cipher.Unpad Method (Byte[], CipherAlgorithm, Padding)
Remove padding from an encryption block.
Syntax
[C#]
public static byte[] Unpad(
byte[] input,
CipherAlgorithm cipherAlg,
Padding pad
)
[VB.NET]
Public Shared Function Unpad ( _
input As Byte(), _
cipherAlg As CipherAlgorithm, _
pad As Padding _
) As Byte()
Parameters
- input
- Padded data
- cipherAlg
- Type: CipherAlgorithm
Block cipher being used
- pad
- Type: Padding
Padding method to use (default is PKCS#5/#7)
Return Value
Unpadded data in byte array.
Remarks
Unless pad is NoPad, the unpadded output is always shorter than the padded input. An error is indicated by returning the original data. If the output length equals the input length, then error.
See Also
VB6/C equivalent: PAD_UnpadBytes
[Contents] [Index]