Loading TOC...

xdmp.sha1

xdmp.sha1(
   $data as String,
   [$encoding as String]
) as String

Summary

Calculates the SHA1 hash of the given argument.

Parameters
$data Data to be hashed. Must be xs:string or a binary node.
$encoding Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex".

Example

  xdmp.sha1("foo");
  => "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33"
 

Example

  xdmp.sha1("foo", "base64");
  => "C+7Hteo/D9vJXQ3UfzxbwnXaijM="
 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.