Aes256Encrypt(String, String, Mode, String) Method |
Encrypt hex-encoded data string
Namespace: CryptoSysAPIAssembly: diCrSysAPINet (in diCrSysAPINet.dll) Version: 6.22.2.24248 (6.22.2.0)
Syntaxpublic static string Encrypt(
string inputHex,
string keyHex,
Mode mode,
string ivHex
)
Public Shared Function Encrypt (
inputHex As String,
keyHex As String,
mode As Mode,
ivHex As String
) As String
Parameters
- inputHex String
- Hex-encoded input data
- keyHex String
- Hex-encoded key representing exactly 32 bytes (256 bits)
- mode Mode
- Cipher Mode
- ivHex String
- Hex-encoded IV representing exactly 16 bytes or "" for ECB mode
Return Value
StringCiphertext in hex-encoded string or empty string on error
RemarksFor ECB and CBC modes, the length of the decoded input bytes must
be an exact multiple of the block length (16 bytes)
See Also