CryptoSys PKI Toolkit Manual

Cipher.Decrypt Method (Byte[], Byte[], Byte[], CipherAlgorithm, Mode)

Decrypt data in byte array

Syntax

[C#]
public static byte[] Decrypt(
	byte[] input,
	byte[] key,
	byte[] iv,
	CipherAlgorithm cipherAlg,
	Mode mode
)
[VB.NET]
Public Shared Function Decrypt ( _
	input As Byte(), _
	key As Byte(), _
	iv As Byte(), _
	cipherAlg As CipherAlgorithm, _
	mode As Mode _
) As Byte()

Parameters

input
Input data to be decrypted
key
Key of exact length for block cipher algorithm
iv
Initialization Vector (IV) of exactly the block size or null for ECB mode
cipherAlg
Cipher algorithm
mode
Cipher mode

Return Value

Decrypted data in byte array or empty array on error

Remarks

For ECB and CBC modes, input data length must be an exact multiple of the block length

[Contents] [Index]


[HOME]   [NEXT: Cipher.Decrypt Method (String, String, String, CipherAlgorithm, Mode)...]

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