CryptoSys PKI Pro Manual

hashFile

Compute hash digest in byte format of a file.

Syntax

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

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

Byte(): Message digest in byte array.

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: hashBytes...]   [Contents]   [Index]   
   [NEXT: hashHexFromBytes...]

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