static byte[] HashFile_SHA3_384(string filePath) { var sha3 = Sha3Permutation.Sha3_384(); var fileBytes = File.ReadAllBytes(filePath); return(sha3.Process(fileBytes, 384, fileBytes.Length)); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage1630() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message1630; var res = new BitString(sha3.Process(input.Bytes, 384, 1630)).ToHexString(); Assert.AreEqual("34 85 D3 B2 80 BD 38 4C F4 A7 77 84 4E 94 67 81 73 05 5D 1C BC 40 C7 C2 C3 83 3D 9E F1 23 45 17 2D 6F CD 31 92 3B B8 79 5A C8 18 47 D3 D8 85 5C", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage1605() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message1605; var res = new BitString(sha3.Process(input.Bytes, 384, 1605)).ToHexString(); Assert.AreEqual("A3 1F DB D8 D5 76 55 1C 21 FB 11 91 B5 4B DA 65 B6 C5 FE 97 F0 F4 A6 91 03 42 4B 43 F7 FD B8 35 97 9F DB EA E8 B3 FE 16 CB 82 E5 87 38 1E B6 24", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage1600() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message1600; var res = new BitString(sha3.Process(input.Bytes, 384)).ToHexString(); Assert.AreEqual("18 81 DE 2C A7 E4 1E F9 5D C4 73 2B 8F 5F 00 2B 18 9C C1 E4 2B 74 16 8E D1 73 26 49 CE 1D BC DD 76 19 7A 31 FD 55 EE 98 9F 2D 70 50 DD 47 3E 8F", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage896() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message896; var res = new BitString(sha3.Process(input.Bytes, 384)).ToHexString(); Assert.AreEqual("79 40 7D 3B 59 16 B5 9C 3E 30 B0 98 22 97 47 91 C3 13 FB 9E CC 84 9E 40 6F 23 59 2D 04 F6 25 DC 8C 70 9B 98 B4 3B 38 52 B3 37 21 61 79 AA 7F C7", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage448() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message448; var res = new BitString(sha3.Process(input.Bytes, 384)).ToHexString(); Assert.AreEqual("99 1C 66 57 55 EB 3A 4B 6B BD FB 75 C7 8A 49 2E 8C 56 A2 2C 5C 4D 7E 42 9B FD BC 32 B9 D4 AD 5A A0 4A 1F 07 6E 62 FE A1 9E EF 51 AC D0 65 7C 22", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage30() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message30; var res = new BitString(sha3.Process(input.Bytes, 384, 30)).ToHexString(); Assert.AreEqual("95 5B 4D D1 BE 03 26 1B D7 6F 80 7A 7E FD 43 24 35 C4 17 36 28 11 B8 A5 0C 56 4E 7E E9 58 5E 1A C7 62 6D DE 2F DC 03 0F 87 61 96 EA 26 7F 08 C3", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage24() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message24; var res = new BitString(sha3.Process(input.Bytes, 384)).ToHexString(); Assert.AreEqual("EC 01 49 82 88 51 6F C9 26 45 9F 58 E2 C6 AD 8D F9 B4 73 CB 0F C0 8C 25 96 DA 7C F0 E4 9B E4 B2 98 D8 8C EA 92 7A C7 F5 39 F1 ED F2 28 37 6D 25", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage5() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message5; var res = new BitString(sha3.Process(input.Bytes, 384, 5)).ToHexString(); Assert.AreEqual("73 7C 9B 49 18 85 E9 BF 74 28 E7 92 74 1A 7B F8 DC A9 65 34 71 C3 E1 48 47 3F 2C 23 6B 6A 0A 64 55 EB 1D CE 9F 77 9B 4B 6B 23 7F EF 17 1B 1C 64", res); }
public void Sha3_384_ShouldReturnCorrectHash_Bitstring_WithMessage0() { var sha3 = Sha3Permutation.Sha3_384(); var input = SpongeTests.Message0; var res = new BitString(sha3.Process(input.Bytes, 384)).ToHexString(); Assert.AreEqual("0C 63 A7 5B 84 5E 4F 7D 01 10 7D 85 2E 4C 24 85 C5 1A 50 AA AA 94 FC 61 99 5E 71 BB EE 98 3A 2A C3 71 38 31 26 4A DB 47 FB 6B D1 E0 58 D5 F0 04", res); }