"test"的字符串在https://md5calc.com/hash/sha3-512/test中会得到"9ece086e9bac491fac5c1d1046ca11d737b92a2b2ebd93f005d7b710110c0a678288166e7fbe796883a4f2e9b3ca9f484f521d0ce464345cc1aec96779149c14"这个值。
using HashLib; // from https://www.nuget.org/packages/HashLib
using System;
class Program
{
static void Main(string[] args)
{
var sha3512 = HashFactory.Crypto.SHA3.CreateKeccak512();
var tempHash = sha3512.ComputeString("test");
Console.WriteLine(tempHash.ToString().ToLower().Replace("-", ""));
}
}
返回值为 "3abff7b1f2042ac3861bd4c0b40efaa8a695909bfb31753fc7b1bd69778de1225a627c8f07cf4814cc05435ada2a1ffee3f4513a8867154274787624f24e551b"
我需要获取第一个字符串,而不是hashlib提供的内容。
Console.WriteLine(tempHash.ToString().ToLower().Replace("-", ""));
? - JodrellHashFactory
? - Jodrell