This macro decrypts the string with the password given using the standard named algorithm. Valid algorithms are "des, des3, idea, cast and bf", where des is the default algorithm. The first argument is assumed to be a b64 encoded value.

The encryption routines are standard and assembly-optimized, so you should feel free to use them in demanding environments.

The encoding option can be specified as hex, to use hex encoding instead of the default b64. Example below.


This:    %encrypt(hello,world)
Returns: 7U/XOd4fiik=
which is the b64 encoding of the binary encryption string.

If you try and decrypt it with the right password you get:
This:    %decrypt(7U/XOd4fiik=,world)
Returns: hello

Try and decode it with the wrong password you get:
This:    %decrypt(7U/XOd4fiik=,badpass)
Returns: %null%

If you want hex encoding, specify it.
This:    %encrypt(hello,world,,hex)
Returns: ed4fd739de1f8a29

If you want blowfish encryption with that hex encoding, no problem.
This:    %encrypt(hello,world,bf,hex)
Returns: ac5c7fa8105d434b

If you want the binary, you need to decode it. The default encoding for %encrypt, %decrypt, %encode and %decode is b64.
This:    %decode(%encrypt(hello,world))
Returns: [Binary of encrypted string]

See Also

encrypt | encode | decode