CryptoSys API Library Manual
cipherFileDecrypt
Decrypt a file with block cipher.
Syntax
[VBA]
Public Function cipherFileDecrypt ( _
szFileOut As String, _
szFileIn As String, _
lpKey() As Byte, _
lpIV() As Byte, _
szAlgModePad As String, _
Optional nOptions As Long = 0 _
) As Long
Parameters
- szFileOut
- Name of output file to be created or overwritten.
- szFileIn
- Name of input file.
- lpKey
- Key of exact length for block cipher algorithm.
- lpIV
- Initialization Vector (IV) of exactly the block size, or empty array for ECB mode or if IV already prefixed to input.
- szAlgModePad
- String with block cipher algorithm, mode and padding,
e.g.
"aes128/cbc/pkcs5"
Alg: aes128|aes192|aes256|tdea|3des|desede3
Mode: ecb|cbc|ofb|cfb|ctr
Pad: pkcs5|nopad|oneandzeroes|ansix923|w3c
- nOptions
- Add
API_IV_PREFIX
to expect the IV to be prepended before the ciphertext in the input
(ignored for ECB mode).
Return Value
Long: Zero (0) on success, or a nonzero error code (use
apiErrorLookup to check).
Remarks
szFileOut
and szFileIn
must not be the same.