CryptoSys API Library Manual
cipherInitHex
Initializes the CIPHER context with hex-encoded key, algorithm and mode ready for repeated incremental operations.
Syntax
[VBA]
Public Function cipherInitHex ( _
fEncrypt As Integer, _
szAlgAndMode As String, _
szKeyHex As String, _
szIvHex As String, _
Optional nOptions As Long = 0 _
) As Long
Parameters
- fEncrypt
- Direction flag: set as
ENCRYPT
(True) to encrypt or DECRYPT
(False) to decrypt.
- szAlgAndMode
- String with block cipher algorithm and mode, e.g.
"aes128/cbc"
- szKeyHex
- Hex-encoded key of exact length for block cipher algorithm.
- szIvHex
- Hex-encoded initialization vector (IV) of exactly the block size or
""
for ECB mode.
- nOptions
- Option flags, set as zero for defaults.
Return Value
Long: Nonzero handle of the CIPHER context, or zero if an error occurs.