Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$SHAHASH^XUSHSH: Returns SHA Hash for a String Entry

Reference Type: Supported, Category: Data Security, Integration Agreement: 6189


This extrinsic function returns the Secure Hash Algorithm (SHA) hash for a string entry. It uses an input variable to specify the length in bits of the desired hash.

NOTE: This API was released with Kernel patch XU*8.0*655.


Input Parameters: n: (required) Length in bits of the desired hash:
  • 160 (SHA-1)
  • 224 (SHA-224)
  • 256 (SHA-256)
  • 384 (SHA-384)
  • 512 (SHA-512)
  x: (required) String to be hashed.
  flag: (optional) Flag to control format of hash:
  • "H" - Hexadecimal (default)
  • "B" - Base64 encoded
Output: returns: SHA hash for a string entry.



>W $$SHAHASH^XUSHSH(256,"This is a test")
>W $$SHAHASH^XUSHSH(256,"This is a test","B")