Tcl
Tcl
Example: Crypt2.SetEncodedIV method
Demonstrates how to call the SetEncodedIV method.Chilkat Tcl Downloads
load ./chilkat.dll
set crypt [new_CkCrypt2]
CkCrypt2_put_CryptAlgorithm $crypt "aes"
CkCrypt2_put_CipherMode $crypt "cbc"
CkCrypt2_put_KeyLength $crypt 256
# Note: The lenght of the IV is equal to the block size of the symmetric encryption algorithm.
# The block size for AES is 16 bytes. Therefore, the IV is 16 bytes regardless of the encryption strenght (128-bit, 256-bit, etc.)
CkCrypt2_SetEncodedIV $crypt "000102030405060708090A0B0C0D0E0F" "hex"
# ...
# ...
delete_CkCrypt2 $crypt