Function EncryptFile(KeyBuffer, InFile, OutFile)
' vector not used in ECM mode
Vector = Chr(0)
Control = "*"
' initialize for encryption in ECB mode
Code = aesInitAES(@KeyBuffer, @Vector, AES_ECB_MODE, AES_ENCRYPT, @Control)
If Code < 0
' encrypt the file (InFile -> OutFile)
Code = aesEncryptFile(@Control, @InFile, @OutFile)
MARSHALLSOFT is a trademark of MarshallSoft Computing, Inc.