CipherEncrypt(String, String, String, CipherAlgorithm, Mode) Method |
Encrypt data block as hex-encoded string.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string Encrypt(
string inputHex,
string keyHex,
string ivHex,
CipherAlgorithm cipherAlg,
Mode mode
)
Public Shared Function Encrypt (
inputHex As String,
keyHex As String,
ivHex As String,
cipherAlg As CipherAlgorithm,
mode As Mode
) As String
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
- cipherAlg CipherAlgorithm
- Cipher algorithm
- mode Mode
- Cipher mode
Return Value
StringCiphertext in hex-encoded string or empty string on error
RemarksFor ECB and CBC modes, input data length must be an exact multiple of the block length.
See Also