security.Digest.CreateDigestString

Creates a SHA1 digest from the given string.

Syntax

security.Digest.CreateDigestString(
   password STRING,
   randBase64 STRING )
  RETURNING result STRING
  1. password is the password to be digested.
  2. randBase64 is a random string in Base64.
  3. result is a base64 encoded string.

Usage

Computes the SHA1 digest from a password value and an optional randBase64 random Base64 form string, and returns it into a string encoded in Base64 form.

The random value must be a valid Base64 String. You typically generate this value with the security.RandomGenerator.CreateRandomString() method.

Throws an exception in case of errors, and updates STATUS with an error code.

Example

DEFINE password, digest STRING
...
LET digest =
    security.Digest.CreateDigestString(
       password,
       security.RandomGenerator.CreateRandomString() )