Initialises the context with the key, direction and mode
ready for repeated
operations of the BLF_Update
or BLF_UpdateHex
functions.
The key and IV data are in hexadecimal format.
Public Declare Function BLF_InitHex Lib "diCryptoSys.dll"
(ByVal strKey As String, ByVal bEncrypt As Boolean,
ByVal strMode As String, ByVal strIV As String) As Long
hContext = BLF_InitHex(strKey, bEncrypt, strMode, strIV)
long __stdcall BLF_InitHex(const char *szKey, int fEncrypt, const char *szMode, const char *sHexIV);
Non-zero handle of the context hContext
to be used in subsequent calls to the functions
BLF_Update
, BLF_UpdateHex
or BLF_Final
.
Returns zero if an error occurs.
Blowfish.InitEncrypt Method (String, Mode, String)
Blowfish.InitDecrypt Method (String, Mode, String)
The initialization vector
string szIV must be exactly 16 hex characters long
(i.e. representing exactly 8 bytes) unless szMode is ECB,
in which case szIV is ignored (use ""
).
The key szKey can be any even length between 2 and 112 hexadecimal characters.
Valid hexadecimal characters are [0-9A-Fa-f].
Unlike most other functions in this API, BLF_InitHex
returns zero if an error occurs.
It is important to check that the value of hContext returned is
not equal to zero before calling BLF_Update
or BLF_UpdateHex
.
See BLF_UpdateHex
.
BLF_Init
BLF_UpdateHex
BLF_Update
BLF_Final