CryptoSys PKI Pro Manual

hashHexFromFile

Compute hash digest in hex format of a file.

Syntax

[VBA]
Public Function hashHexFromFile ( _
    szFileName As String, _
    nOptions As Long _
) As String

Parameters

szFileName
Name of file containing message data.
nOptions
Algorithm to be used. Select one from:
PKI_HASH_SHA1
PKI_HASH_SHA224
PKI_HASH_SHA256
PKI_HASH_SHA384
PKI_HASH_SHA512
PKI_HASH_SHA3_224
PKI_HASH_SHA3_256
PKI_HASH_SHA3_384
PKI_HASH_SHA3_512
PKI_HASH_MD5
PKI_HASH_MD2
PKI_HASH_RMD160
PKI_HASH_BTC160
and optionally add PKI_HASH_DOUBLE to compute a double hash, HASH(HASH(m)). Add PKI_HASH_MODE_TEXT to hash in "text" mode instead of default "binary" mode.

Return Value

String: Message digest in hex-encoded format.

Remarks

The default mode is "binary" where each byte is treated individually. In "text" mode CR-LF pairs will be treated as a single newline (LF) character.
[PREV: hashHexFromBytes...]   [Contents]   [Index]   
   [NEXT: hashHexFromHex...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.