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)
String containing the key in hexadecimal
representation.Boolean direction flag:
set as True to encrypt or False
to decrypt.String specifying the confidentiality mode:String containing the initialization vector
in hexadecimal.
long _stdcall BLF_InitHex(const char *strHexKey, int bEncrypt,
const char *strMode, const char *strHexIV);
Long: 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 strIV must be exactly 16 hex characters long
(i.e. representing exactly 8 bytes) unless strMode is ECB,
in which case strIV is ignored (use "").
The key strKey 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