CryptoSys PKI Pro Manual

cipherFileDecrypt

Decrypt a file.

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 required length, or empty array for ECB mode or if IV is prefixed.
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|gcm
Pad:  pkcs5|nopad|oneandzeroes|ansix923|w3c
nOptions
Add PKI_IV_PREFIX to expect the IV before the ciphertext in the input.

Return Value

Long: Zero on success or nonzero error code.

Remarks

fileOut and fileIn must not be the same. GCM mode is only available with AES. The IV must be exactly 12 bytes long for GCM.
[PREV: cipherEncryptHex...]   [Contents]   [Index]   
   [NEXT: cipherFileEncrypt...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.