20.1 Encryption and Decryption

For security reasons any sensitive data should be encrypted when being passed between the web server and application server.

The most common example for encryption is of course a password. Here is an example detailing how you may implement encryption and decryption.

1. Start by creating a field to store your encryption value (You can store this value wherever you like but a field does the job nicely)

2. In your Web Page or Reusable Part encrypt the value entered by the user like this:

* Use default value for encryption

#XSPasswordEncrypted := #XSPassword.Encrypt( #XSEncryptKey )

3. Now you can pass the encrypted value to a Server module securely, where it can be verified or saved.

    An equivalent decrypt intrinsic is available.