You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

encrypt()

Usage

encrypt(text)
encrypt(text, secret)

Description
Encrypts the given string using AES and returns the ciphertext encoded in base 64. This method either uses the internal global encryption key that is stored in structr.conf, or the optional second parameter.

Example

${set(this, 'encrypted', encrypt('example string'))}
${set(this, 'encrypted', encrypt('example string', 'secret key'))}

Search results for "encrypt()"

encrypt()

Encrypts the given string using AES and returns the ciphertext encoded in base 64. This method either uses the internal global encryption key that is stored in structr.conf, or the optional second parameter.

encrypt(text [, secret ] )