ENCRYPT() - Encrypt Specified String
Syntax in BBj 9.00 and higher
ENCRYPT(string{,password}{,MODE=string}{,ERR=lineref})
Syntax prior to BBj 9.00
Before BBj 9.00
ENCRYPT(string,MODE=string{,ERR=lineref})
Description
In PRO/5 5.00 and BBj 4.00 and higher, the ENCRYPT() encrypts the specified string and returns an encrypted string. Note that the
encrypted string may be longer than the specified string.
Mode |
Value |
on text editor, so that i can get this bug done h |
---|---|---|
CRYPTPASS= |
String |
The encryption key. BASIS recommends a password of at least 20 characters when using AES-128 and at least 40 characters when using AES-256. |
CRYPTALG= |
|
Uses AES-128 bit encryption, which is also the default. In BBj 6.0 and higher, and PRO/5 6.0 and higher, uses AES-256 bit encryption. |
CHARSET= |
String |
In BBj 16.00 and higher, specifies the character set encoding of the password string. |
To utilize AES-256 in BBj, the Java Cryptography Extension (JCE) module must be installed. This module is available for download at Oracle's Java Cryptography Extension (JCE) Downloads page.
Parameter |
Description |
---|---|
string |
The text that the ENCRYPT function will cipher. |
password |
The encryption key. BASIS recommends a password of at least 20 characters when using AES-128 and at least 40 characters when using AES-256 |
If both the password parameter and the CRYPTPASS= mode are specified, the password value takes precedence.
BBj 16.00 and Higher
Example 1
|
BBj 9.00 and Higher
Example 2
|
Prior to BBj 9.00
Example 3
LET C$=ENCRYPT(A$,MODE="CRYPTPASS=use at least 20 characters")
Example 4
LET C$=ENCRYPT(A$,MODE="CRYPTALG=AES-256,CRYPTPASS=use 40 characters")
Example 5
|