Click or drag to resize

HashHexFromHex Method

Create hash digest in hex format of hex-encoded input.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntax
public static string HexFromHex(
	string messageHex,
	HashAlgorithm hashAlg
)

Parameters

messageHex  String
Message data in hex-encoded format
hashAlg  HashAlgorithm
Hash algorithm to be used

Return Value

String
Message digest in hex-encoded format
Example
C#
string m = "616263";  // "abc" encoded in a hex string
string s = Hash.HexFromHex(m, HashAlgorithm.Sha256);
Console.WriteLine("SHA-256('abc')=\n" + s);
// ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
See Also