Click or drag to resize

HashLength Method

Return length of message digest output in bytes.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntax
public static int Length(
	HashAlgorithm hashAlg
)

Parameters

hashAlg  HashAlgorithm
Hash algorithm

Return Value

Int32
Length of the hash function output in bytes.
Example
C#
HashAlgorithm alg = HashAlgorithm.Sha256;
Console.WriteLine("len({0})={1}", alg.ToString(), Hash.Length(alg));
// len(Sha256)=32
See Also