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 provided in byte arrays.
Public Declare Function BLF_Init Lib "diCryptoSys.dll"
(ByRef abKey As Byte, ByVal nKeyLen As Long, ByVal bEncrypt As Boolean,
ByVal strMode As String, ByRef abInitV As Byte) As Long
hContext = BLF_Init(abKey(0), nKeyLen, bEncrypt, strMode, abInitV(0))
Byte array containing the key.Long containing the length of the key in bytes.Boolean direction flag:
set as True to encrypt or False
to decrypt.String specifying the confidentiality mode:Byte array containing the initialization vector (IV),
or zero (0) for ECB mode.
long _stdcall BLF_Init(const unsigned char *key,
long keyBytes, int bEncrypt,
const char *strMode, const unsigned char *iv);
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 (Byte[], Mode, Byte[])
Blowfish.InitDecrypt Method (Byte[], Mode, Byte[])
The initialization vector
byte array abInitV must be exactly the block size of 8 bytes long,
except for ECB mode, where it is ignored (use 0).
The key array abKey can be any length between 1 and 56 bytes (448 bits).
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_Update.
BLF_InitHex
BLF_UpdateHex
BLF_Update
BLF_Final