The encrypt( function encrypts data.


This function has two parameters:

data – the data to be encrypted. This parameter should contain binary data, however, if text is passed, it will automatically be converted to binary data for you (see Binary Data).

password – the password to be used to encrypt the data. You’ll need this password to later decrypt the data.


This function encrypts binary data (or text). This example encrypts the information in the Letter field (or variable) into a file named Letter.secret, using the password My Secret. (Of course you usually would not want to use a fixed password like this.)

filesave "Letter.secret",encrypt(Letter,"My Secret")

Later, when you want to decode the secret letter, you would use code like this:

Letter = decrypt(fileload("Letter.secret"),"My Secret")

If the password used for decrypting doesn’t match the password used for encrypting, an error occurs.

Note: This function encrypts data using AES–256 encryption. See Advanced Encryption Standard for more information.

See Also


10.0NewNew in this version.