xdmp:hmac-sha256( $secretkey as item(), $message as item(), [$encoding as xs:string] ) as xs:string
Calculates the Hash-based Message Authentication Code (HMAC) using the SHA256 hash function of the given secret key and message arguments.
xdmp:hmac-sha256("foo", "bar") => "f9320baf0249169e73850cd6156ded0106e2bb6ad8cab01b7bbbebe6d1065317"
xdmp:hmac-sha256("foo", "bar", "base64") => "+TILrwJJFp5zhQzWFW3tAQbiu2rYyrAbe7vr5tEGUxc="
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.