CryptoSys PKI Pro Manual

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]

[PREV: Cipher.Pad Method (String, CipherAlgorithm, Padding)...]   [Contents]   [Index]   
   [NEXT: Cipher.Unpad Method (String, CipherAlgorithm, Padding)...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.