@VerifyPassword (Formula Language)

Compares two passwords.

Note: This @function is new with Release 6.

Syntax

@VerifyPassword( password ; password )

Parameters

password

Text. This can be a text expression or a password field name.

Return value

flag

Boolean.

  • Returns 1 (True) if the passwords are equivalent.
  • Returns 0 (False) if the passwords are not equivalent.

Usage

Use this function to verify which password format, @Password or @HashPassword, was used to encode a password field.

Examples

  1. This example returns true:
    @VerifyPassword("tolstoy";@HashPassword("tolstoy"))
  2. This example returns false because the hashed string contains an upper-case T:
    @VerifyPassword("tolstoy";@HashPassword("Tolstoy")
  3. If the access field is a password field containing the string, "He++llo", this code returns true:
    @VerifyPassword(access;@Password(access))
  4. This code returns false because the @HashPassword and @Password functions use different formats to encode the contents of the access field:
    @VerifyPassword(@HashPassword(access);@Password(access))