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

$$SHAN^XLFSHAN: Returns SHA Hash for a Message

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

Description

This extrinsic function returns the SHA hash of a message.

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

Format

$$SHAN^XLFSHAN(hashlen,message)

Input Parameters

hashlen (required) The hash length in bits:
  • 160 (SHA-1)
  • 224 (SHA-224)
  • 256 (SHA-256)
  • 384 (SHA-384)
  • 512 (SHA-512)
message (required) The message string.

Output

Output
  • SHA hash if successful.
  • Zero (0) - If there is an error.

 

Example

>W $$SHAN^XLFSHAN(256,"this is a test")
2E99758548972A8E8822AD47FA1017FF72F06F3FF6A016851F45C398732BC50C