CryptoSys API Library Manual
Aes128.Encrypt Method (String, String, Mode, String)
Encrypt hex-encoded data string
Syntax
[C#]
public static string Encrypt(
string inputHex,
string keyHex,
Mode mode,
string ivHex
)
[VB.NET]
Public Shared Function Encrypt ( _
inputHex As String, _
keyHex As String, _
mode As Mode, _
ivHex As String _
) As String
Parameters
- inputHex
- Hex-encoded input data
- keyHex
- Hex-encoded key representing exactly 16 bytes (128 bits)
- mode
- Type: Mode
Cipher Mode
- ivHex
- Hex-encoded IV representing exactly 16 bytes or "" for ECB mode
Return Value
Ciphertext in hex-encoded string or empty string on error
Remarks
For ECB and CBC modes, the length of the decoded input bytes must be an exact multiple of the block length (16 bytes)
See Also
VB6/C equivalent: AES128_HexMode
[Contents] [Index]