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]