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
Python Equivalent
Remarks
[New in v20.5]
Example (VBA core function)
Debug.Print Hash_Length(PKI_HASH_SHA512)
Example (VBA wrapper function)
Debug.Print hashLength(PKI_HASH_BTC160)
See Also
[Contents] [Index]