xdmp:crypt( $password as xs:string, $salt as xs:string ) as xs:string
Calculates the password hash for the given password and salt.
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.
xdmp:crypt("123abc","admin") => "arQEnpM6JHR8vY4n3e5gr0"
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.