Return length of message digest output in bytes.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntaxpublic static int Length(
HashAlgorithm hashAlg
)
Public Shared Function Length (
hashAlg As HashAlgorithm
) As Integer
Parameters
- hashAlg HashAlgorithm
- Hash algorithm
Return Value
Int32Length of the hash function output in bytes.
ExampleHashAlgorithm alg = HashAlgorithm.Sha256;
Console.WriteLine("len({0})={1}", alg.ToString(), Hash.Length(alg));
See Also