CryptoSys PKI Pro Manual

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

Decrypt data block in byte array.

Syntax

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

Parameters

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

Return Value

Byte
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.

See Also

VB6/C equivalent: CIPHER_Bytes

[Contents] [Index]

[PREV: Cipher.BlockBytes Method...]   [Contents]   [Index]   
   [NEXT: Cipher.Decrypt(Byte, Byte, Byte, CipherAlgorithm, Mode, Padding, Cipher.Opts) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.