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

$$HOSTFILE^XLFSHAN: Returns SHA Hash for Specified Host File

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

Description

This extrinsic function returns the SHA hash for a specified host file. It uses the $$FTG^%ZISH API to load the host file for processing.

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

Format

$$HOSTFILE^XLFSHAN(hashlen,path,filename)

Input Parameters

hashlen (required) The hash length in bits:
  • 160 (SHA-1)
  • 224 (SHA-224)
  • 256 (SHA-256)
  • 384 (SHA-384)
  • 512 (SHA-512)
path (required) Full path, up to but not including the filename.
filename (required) Name of the file.

Output

Output
  • SHA hash if successful.
  • Zero (0) - If the host file could not be opened/found.

 

Example

>W $$HOSTFILE^XLFSHAN(160,"Z:\Cache2014\","cache.cpf")
F11F3595604296A1F8BCF13AA7F2744FB9EB1675