CryptoSys PKI Pro Manual

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

Decrypt data in a byte array using the specified block cipher algorithm, mode and padding.

Syntax

[C#]
public static byte[] Decrypt(
	byte[] input,
	byte[] key,
	byte[] iv,
	CipherAlgorithm cipherAlg,
	Mode mode,
	Padding pad,
	Cipher.Opts opts
)
[VB.NET]
Public Shared Function Decrypt ( _
	input As Byte(), _
	key As Byte(), _
	iv As Byte(), _
	cipherAlg As CipherAlgorithm, _
	mode As Mode, _
	pad As Padding, _
	opts As Cipher.Opts _
) 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 or if IV is prefixed.
cipherAlg
Type: CipherAlgorithm
Cipher algorithm
mode
Type: Mode
Cipher mode
pad
Type: Padding
Padding method to use
opts
Type: Cipher.Opts
Advanced options. Use Cipher.Opts.PrefixIV to expect the IV to be prepended to the input.

Return Value

Decrypted plaintext in byte array or empty array on error

Remarks

Default padding is Pkcs5 for ECB and CBC mode and NoPad for all other modes. It is an error if the specified padding is not found after decryption.

See Also

VB6/C equivalent: CIPHER_DecryptBytes

[Contents] [Index]

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

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