CryptoSys PKI Pro Manual

Cipher.Decrypt Method (String, String, String, CipherAlgorithm, Mode, Padding, Cipher.Opts)

Decrypt hex-encoded data using specified block cipher algorithm, mode and padding.

Syntax

[C#]
public static string Decrypt(
	string inputHex,
	string keyHex,
	string ivHex,
	CipherAlgorithm cipherAlg,
	Mode mode,
	Padding pad,
	Cipher.Opts opts
)
[VB.NET]
Public Shared Function Decrypt ( _
	inputHex As String, _
	keyHex As String, _
	ivHex As String, _
	cipherAlg As CipherAlgorithm, _
	mode As Mode, _
	pad As Padding, _
	opts As Cipher.Opts _
) As String

Parameters

inputHex
Hex-encoded input data
keyHex
Hex-encoded key representing exact key length
ivHex
Hex-encoded IV representing exact block length, or "" 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 plaintex in hex-encoded string or empty string on error

Remarks

Input data may be any even number of hex characters, but not zero. Default padding is Pkcs5 for ECB and CBC mode and NoPad for all other modes.

See Also

VB6/C equivalent: CIPHER_DecryptHex

[Contents] [Index]

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

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