CryptoSys API Library Manual

HASH_Init

Initialises the HASH context ready for subsequent calls with HASH_AddBytes and HASH_Final.

VBA/VB6 Syntax

Public Declare Function HASH_Init Lib "diCryptoSys.dll" (ByVal nAlg As Long) As Long

Dim hContext As Long
hContext = HASH_Init(nAlg)

C/C++ Syntax

long _stdcall HASH_Init(long nAlg);

Parameters

nAlg
[in] Algorithm to be used. Select one of:
API_HASH_SHA1 (0) to use the SHA-1 algorithm (default)
API_HASH_SHA224 to use the SHA-224 algorithm
API_HASH_SHA256 to use the SHA-256 algorithm
API_HASH_SHA384 to use the SHA-384 algorithm
API_HASH_SHA512 to use the SHA-512 algorithm
API_HASH_SHA3_224 to use the SHA-3-224 algorithm
API_HASH_SHA3_256 to use the SHA-3-256 algorithm
API_HASH_SHA3_384 to use the SHA-3-384 algorithm
API_HASH_SHA3_512 to use the SHA-3-512 algorithm

Returns (VBA/C)

Non-zero handle of the HASH context, or zero if an error occurs.

.NET Equivalent

Hash.Init Method

C++ (STL) Equivalent

bool crsysapi::Hash::Init (Alg alg)

Remarks

Only the SHA-1, SHA-2 and SHA-3 families of hash algorithms are supported. While the context handle is valid, add data to be digested in blocks of any length using HASH_AddBytes. VBA users can use the wrapper functions hashAddBytes and hashAddString.

Example

See HASH_AddBytes.

See Also

HASH_AddBytes HASH_Final

[Contents] [Index]

[PREV: HASH_HexFromHex...]   [Contents]   [Index]   
   [NEXT: HASH_Length...]

Copyright © 2001-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-01-07T07:42:00Z.