public void Blake2s_Hash()
        {
            var hasher = new Blake2s();
            var result = hasher.Digest(testValue2).ToHexString();

            Assert.Equal("c3ee938582d70ccd9a323b6097357449365d1fdfbbe2ecd7ee44e4bdbbb24392", result);
        }
Beispiel #2
0
    public void Blake2s_Hash_Empty()
    {
        var hasher = new Blake2s();
        var hash   = new byte[32];

        hasher.Digest(Array.Empty <byte>(), hash);
        var result = hash.ToHexString();

        Assert.Equal("69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9", result);
    }
        public void Blake2s_Hash_Should_Throw_On_Null_Input()
        {
            var hasher = new Blake2s();

            Assert.Throws <ArgumentNullException>(() => hasher.Digest(null));
        }