Cipher.Unpad Method (String, CipherAlgorithm)
Remove padding from a hex-encoded encryption block (PKCS#5/#7 padding).
Syntax
[C#]
public static string Unpad(
string inputHex,
CipherAlgorithm cipherAlg
)
[VB.NET]
Public Shared Function Unpad ( _
inputHex As String, _
cipherAlg As CipherAlgorithm _
) As String
Parameters
- inputHex
- hex-encoded padded data
- cipherAlg
- Type: CipherAlgorithm
Block cipher being used
Return Value
Unpadded data in hex-encoded string or unchanged data on error
Remarks
Padding is expected according to the convention in PKCS#5/#7. The unpadded output is always shorter than the padded input. An error is indicated by returning the original data. Check its length.
See Also
VB6/C equivalent: PAD_UnpadHex
[Contents] [Index]