public static void HashEmptyWithSpan(int hashSize) { var a = new Sha3_512(); var expected = s_hashOfEmpty.DecodeHex().Substring(0, hashSize); var actual = new byte[hashSize]; a.Hash(ReadOnlySpan <byte> .Empty, actual); Assert.Equal(expected, actual); }
public static void HashEmpty() { var a = new Sha3_512(); var expected = s_hashOfEmpty.DecodeHex(); var actual = a.Hash(ReadOnlySpan <byte> .Empty); Assert.Equal(a.DefaultHashSize, actual.Length); Assert.Equal(expected, actual); }