public void ComputeHash_ReturnsCorrectHash_1() { var testString = "The quick brown fox jumps over the lazy dog"; var expected = "b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35"; var actual = _blake.display(_blake.Start(testString)); Assert.True(AreEqual(expected, actual)); }
private static byte[] GetHash(string testString) { var blake = new Whirlpool_Algorithm(); var hash = blake.Start(testString); var hashToDisplay = blake.display(hash); Console.WriteLine("Текст: {0}", testString); Console.WriteLine("Хэш\n{0}", hashToDisplay); Console.ReadLine(); return(hash); }