Cipher.Unpad Method (String, CipherAlgorithm, Padding)
Remove padding from a hex-encoded encryption block.
Syntax
[C#]
public static string Unpad(
string inputHex,
CipherAlgorithm cipherAlg,
Padding pad
)
[VB.NET]
Public Shared Function Unpad ( _
inputHex As String, _
cipherAlg As CipherAlgorithm, _
pad As Padding _
) As String
Parameters
- inputHex
- Hex-encoded 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 hex-encoded string.
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_UnpadHex
[Contents] [Index]