Function EncryptFile(KeyBuffer, InFile, OutFile)
Local Code
Local Control
Local Vector
' 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
return Code
exit
endif
' encrypt the file (InFile -> OutFile)
Code = aesEncryptFile(@Control, @InFile, @OutFile)
return Code
HOME PAGE
MARSHALLSOFT is a trademark of MarshallSoft Computing, Inc.