Functions and Directives

Function AX_Encrypt() Professional

Encryption of a string.

AX_Encrypt( <cString> [, <cPassword>] ) --> cDecrypted
The parameter <cString> contains that string to be encrypted.
The optional parameter <cPassword> may contain the password to be used for encryption. If the parameter is omitted, the encryption is based on the password set by a prior call of the AX_SetPass() function.

This function returns the encrypted character string.


The function AX_Encrypt() encrypts a string using the password set with the AX_SetPass() function (or its command opponent). If the optional parameter <cPassword> is used, the encryption is based on the value of this parameter.

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

   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 

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.