CryptoSys PKI Toolkit Manual

Cipher.Unpad Method (String, CipherAlgorithm)

Removes the padding from a hex-encoded encryption block

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/CMS. 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]

[HOME]   [NEXT: Cms.GetSigDataDigest Method (String, String)...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.