MarkLogic Server 11.0 Product Documentation
xdmp:cryptxdmp:crypt(
$password as xs:string,
$salt as xs:string
) as xs: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"
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.