CryptoSys PKI Pro Manual

HASH_Length

Return length of message digest output in bytes.

VBA/VB6 Syntax

Public Declare Function HASH_Length Lib "diCrPKI.dll" (ByVal nAlgId As Long) As Long

nRet = HASH_Length(nAlgId)

C/C++ Syntax

long __stdcall HASH_Length(long nAlgId);

Parameters

nAlgId
[in] Algorithm Id flag. Select one of PKI_HASH_* or PKI_HMAC_*, for example:
PKI_HASH_SHA1 SHA-1 algorithm
PKI_HASH_SHA224 SHA-224 algorithm
PKI_HASH_SHA256 SHA-256 algorithm
PKI_HASH_SHA384 SHA-384 algorithm
PKI_HASH_SHA512 SHA-512 algorithm
PKI_HASH_SHA3_224 SHA-3-224 algorithm
PKI_HASH_SHA3_256 SHA-3-256 algorithm
PKI_HASH_SHA3_384 SHA-3-384 algorithm
PKI_HASH_SHA3_512 SHA-3-512 algorithm
PKI_HASH_MD5 MD5 algorithm
PKI_HASH_MD2 MD2 algorithm
PKI_HASH_RMD160 RIPEMD-160 algorithm
PKI_HASH_BTC160 Bitcoin160 algorithm, RIPEMD160(SHA256(m))

Returns (VBA/C)

Length of the hash function output in bytes; else a negative error code.

VBA Wrapper Syntax

Public Function hashLength (nAlgId As Long) As Long

.NET Equivalent

Hash.Length Method

C++ (STL) Equivalent

static int dipki::Hash::Length (Alg alg)

Python Equivalent

static Hash.length(alg)

Remarks

[New in v20.5]

Example (VBA core function)

Debug.Print Hash_Length(PKI_HASH_SHA512)
' 64

Example (VBA wrapper function)

Debug.Print hashLength(PKI_HASH_BTC160)
' 20

See Also

[Contents] [Index]

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

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