CryptoSys API Library Manual

SHA1_HexDigest

Returns the final message digest value as a hex string.

VBA/VB6 Syntax

Public Declare Function SHA1_HexDigest Lib "diCryptoSys.dll" (ByVal strDigest As String, ByVal hContext As Long) As Long

nRet = SHA1_HexDigest(strDigest, hContext)

C/C++ Syntax

long __stdcall SHA1_HexDigest(char *szDigest, long hContext);

Parameters

szDigest
[out] variable long enough to receive the final message digest.
hContext
[in] handle to the SHA-1 context.

Returns (VBA/C)

If successful, the return value is 0; otherwise it returns a non-zero error code.

.NET Equivalent

Sha1.HexDigest Method

Remarks

This operation delivers the result of Add operations since the last Init or Reset operation. The handle to the context hContext must have been set up with a prior call to SHA1_Init. The string variable szDigest must have been set up with at least 40 (API_MAX_SHA1_CHARS) characters (41 in a C program) to receive the digest value in hex format. Note that this digest operation is a destructive, read-once operation. Once it has been performed, the context must be reset before being used to calculate another digest value.

Example

See SHA1_AddString and SHA1_AddBytes

See Also

SHA1_Init SHA1_AddString SHA1_AddBytes SHA1_Reset

[Contents] [Index]

[PREV: SHA1_FileHexHash...]   [Contents]   [Index]   
   [NEXT: SHA1_Hmac...]

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