Syntax
SetEncryptionKey <keydata>Description
Set the encryption key for a subsequent encryption or decryption operation.Parameters
<keydata>
- The data to be used as the encryption key.
Remarks
The key set by this statement can be used with a subsequent Encrypt, Decrypt, RC4Encrypt, or RC4Decrypt statement.RC4Encrypt and RC4Decrypt use 128-bit RC4 encryption. Encrypt and Decrypt use a P1 Systems Incorporated proprietary 32-bit encryption scheme.
The encryption result is non-printable binary data that is the same length as the source data.
The encryption key must be set before every encryption or decryption operation using SetEncryptionKey.
Example
Global plainText = "The plain text."
Global secret
Global decryption
SetEncryptionKey "mykey"
Encrypt SourceData=plainText Result=secret
MessageBox Title="Encrypted text" Text=secret
SetEncryptionKey "mykey"
Decrypt SourceData=secret Result=decryption
MessageBox Title="Decrypted text" Text=decryptionThe above example displays the plaintext in a message box followed by the decryption of that data in another message box.