Loading TOC...

xdmp.crypt

xdmp.crypt(
   $password as String,
   $salt as String
) as String

Summary

Calculates the password hash for the given password and salt.

Parameters
$password String to be hashed.
$salt Salt to avoid 1:1 mapping from passwords to hashes. Only the first 8 characters of the salt are significant; any characters beyond the eighth are ignored.

Usage Notes

You typically use the username as the salt, which ensures that no two hash values will be the same, even if different users have the same password.

Example

  xdmp.crypt("123abc","admin");
  => "arQEnpM6JHR8vY4n3e5gr0"

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy