CryptoSys PKI Pro Manual

Cipher.Encrypt Method (String, String, String, CipherAlgorithm, Mode)

Encrypt data block as hex-encoded string.

Syntax

[C#]
public static string Encrypt(
	string inputHex,
	string keyHex,
	string ivHex,
	CipherAlgorithm cipherAlg,
	Mode mode
)
[VB.NET]
Public Shared Function Encrypt ( _
	inputHex As String, _
	keyHex As String, _
	ivHex As String, _
	cipherAlg As CipherAlgorithm, _
	mode As Mode _
) 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
cipherAlg
Type: CipherAlgorithm
Cipher algorithm
mode
Type: Mode
Cipher mode

Return Value

Ciphertext in hex-encoded string or empty string 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_Hex

[Contents] [Index]

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

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