Functions and Directives

Function AX_Decrypt() Professional

Decryption of a previously encrypted string.

Syntax
AX_Decrypt( <cString> [, <cPassword>] ) --> cDecrypted
Parameters
<cString>
The parameter <cString> contains that string that is to be decrypted.
<cPassword>
The optional parameter <cPassword> may contain the password to be used for decryption. If the parameter is not used, the decryption is based on the password set by a prior call of the AX_SetPass() function.
Return

This function returns the decrypted character string.

Description

The function AX_Decrypt() decrypts a string using the password set with the AX_SetPass() function (or its command opponent). If the optional parameter <cPassword> is used, the decryption is based upon the value of this parameter.

If <cString> does not contain a character string, the value of <cString>is returned unchanged.

Examples
PROCEDURE Main 
   LOCAL cString, cPassword, cEncryt 

   cString   := "The fall of Hyperion"          // String to be encrypted 
   cPassWord := "Shrike"                        // Password 
   cEncrypt  := AX_Encrypt( cString, cPassWord) // Encryption of string 

   ? cEncrypt 

   cString := AX_Decrypt( cEncrypt, cPassword ) // Decryption of string 
   ? cString 

   AX_SetPass( "Kassad" )              // Set password for workarea 

   cEncrypt := AX_Encrypt( cString )   // Encrypt using workarea's password 
   ? cEncrypt 

   cString := AX_Decrypt( cEncrypt )   // Decrypt using workarea's password 
   ? cString 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.