Decrypt hex-encoded data using the specified block cipher algorithm, mode and padding. The input data, key and initialization vector are all represented as hexadecimal strings.
Public Function cipherDecryptHex ( _ szInputHex As String, _ szKeyHex As String, _ szIvHex As String, _ szAlgModePad As String, _ Optional nOptions As Long = 0 _ ) As String
PKI_IV_PREFIX
is used (use ""
)."aes128/cbc/pkcs5"
Alg: aes128|aes192|aes256|tdea|3des|desede3 Mode: ecb|cbc|ofb|cfb|ctr|gcm Pad: pkcs5|nopad|oneandzeroes|ansix923|w3c
PKI_IV_PREFIX
to expect the IV to be prepended before the ciphertext in the input (not applicable for ECB mode).Pkcs5
for ECB and CBC mode and NoPad
for all other modes.
GCM mode is only available with AES. The IV must be exactly 12 bytes long for GCM.