Sample code for 30+ languages & platforms
AutoIt

Transition from RandomizeKey to GenRandomBytesENC

Provides instructions for replacing deprecated RandomizeKey method calls with GenRandomBytesENC.

Chilkat AutoIt Downloads

AutoIt
$oCrypt = ObjCreate("Chilkat.Crypt2")

$oCrypt.CryptAlgorithm = "aes"
$oCrypt.CipherMode = "cbc"
$oCrypt.KeyLength = 256
; ...

; ------------------------------------------------------------------------
; The RandomizeKey method is deprecated:

; Generates and sets a random 32-byte (256-bit) secret key.
$oCrypt.RandomizeKey 

; ------------------------------------------------------------------------
; Do the equivalent using GenRandomBytesENC followed by SetEncodedKey

$oCrypt.EncodingMode = "base64"
Local $sRandomKeyBase64 = $oCrypt.GenRandomBytesENC(32)
$oCrypt.SetEncodedKey $sRandomKeyBase64,"base64"