Click or drag to resize

CipherUnpad(String, CipherAlgorithm, Padding) Method

Remove padding from a hex-encoded encryption block.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static string Unpad(
	string inputHex,
	CipherAlgorithm cipherAlg,
	Padding pad = Padding.Pkcs5
)

Parameters

inputHex  String
Hex-encoded padded data
cipherAlg  CipherAlgorithm
Block cipher being used
pad  Padding  (Optional)
Padding method to use (default is PKCS#5/#7)

Return Value

String
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