Tag: keccak

简单实现SHA-3 Keccak散列到C#的错误输出?

我会简短而简单! 我正在学习C#,我正在努力让HashLib库@ https://hashlib.codeplex.com/为新的SHA-3 Keccak算法工作。 我写了一个简单的Console / Win32应用程序,据说必须输出正确的哈希码,但事实并非如此! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Diagnostics; using HashLib; using System.Threading.Tasks; namespace ConsoleApplication5 { class Program { static void Main(string[] args) { { string passPhrase = “”; IHash hash = HashFactory.Crypto.SHA3.CreateKeccak512(); HashResult r = hash.ComputeString(passPhrase, System.Text.Encoding.ASCII); Console.WriteLine(r.ToString().ToLower().Replace(“-“,””)); Console.WriteLine(“{0}, {1}, {2}”, hash.BlockSize, hash.HashSize, hash.Name); […]