QMDecrypt()

QMDecrypt()

Top  Previous  Next

 

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:

 

Datais the encrypted data to be decrypted.

 

KeyStringis the encryption key to be used.

 

 

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.

 

The QMDecrypt() function decrypts data that was encrypted with either QMEncrypt() or QMEncryptx().

 

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".

 

 

hmtoggle_plus1C

 

hmtoggle_plus1VB.Net

 

hmtoggle_plus1QMBasic Class Module

 

hmtoggle_plus1Java

 

hmtoggle_plus1Python

 

 

See also:

QMEncrypt()