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

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

Reference Type: Supported, Category: Data Security, ICR#: 6157

Description

The $$HOSTFILE^XLFSHAN 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

returns:

Returns:

  • 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