Click or drag to resize

CipherDecrypt(String, String, String, CipherAlgorithm, Mode, Padding, CipherOpts) Method

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

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static string Decrypt(
	string inputHex,
	string keyHex,
	string ivHex,
	CipherAlgorithm cipherAlg,
	Mode mode,
	Padding pad = Padding.Default,
	CipherOpts opts = CipherOpts.Default
)

Parameters

inputHex  String
Hex-encoded input data
keyHex  String
Hex-encoded key representing exact key length
ivHex  String
Hex-encoded IV representing exact block length, or "" for ECB mode or if IV is prefixed.
cipherAlg  CipherAlgorithm
Cipher Algorithm
mode  Mode
Cipher Mode
pad  Padding  (Optional)
Padding method to use
opts  CipherOpts  (Optional)
Advanced options. Use Cipher.Opts.PrefixIV to expect the IV to be prepended to the input.

Return Value

String
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