The QMDecrypt() function decrypts data that has been encrypted for secure storage or transmission. It is analogous to the QMBasic DECRYPT() function.
The function arguments are:
The QMDecrypt() function applies the AES 128 bit encryption algorithm to the supplied data and returns the decrypted text. The key string may be up to 64 characters in length and may contain any character. It is automatically transformed into a form that is usable by the AES algorithm. For optimum data security, the key should be a minimum of 16 characters though shorter keys can be used.
The encrypted data is structured so that it can never contain characters from the C0 control group (characters 0 to 31) or the mark characters. As a result of this operation, the encrypted data is slightly longer than the decrypted data.
This function is evaluated on the client system and does not require a server connection to be open.
The examples below decrypt the data in variable Var using an encryption key of "MyKey".