CryptoSys PKI Pro Manual

Hash.Length Method

Return length of message digest output in bytes.

Syntax

[C#]
public static int Length(
   HashAlgorithm hashAlg 
)
[VB]
Public Shared Function Length (
   hashAlg As HashAlgorithm 
) As Integer

Parameters

hashAlg  HashAlgorithm
Hash algorithm

Return Value

Int32
Length of the hash function output in bytes.

Example

HashAlgorithm alg = HashAlgorithm.Sha256;
Console.WriteLine("len({0})={1}", alg.ToString(), Hash.Length(alg));
// len(Sha256)=32

See Also

VB6/C equivalent: HASH_Length

[Contents] [Index]

[PREV: Hash.HexFromTextFile Method...]   [Contents]   [Index]   
   [NEXT: HexExtension.FromHex Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.