MarkLogic Server 11.0 Product Documentation
xdmp:crypt2

xdmp:crypt2(
   $password as xs:string
) as xs:string

Summary

Calculates the password hash for the given plain-text password.

Parameters
password String to be hashed.

Usage Notes

The password is encrypted using sha256 encoding and it is salted. A salt is generated using base-64 representation of a random number. This minimizes the probability of hash collisions even if different users have the same password.

Example

  xdmp:crypt2("123abc")
  => "$2$aUI4j7YVqvecKkJ7QrK01.$2$ElWEwaxZ"
Powered by MarkLogic Server | Terms of Use | Privacy Policy