Пример #1
0
        public void ScryptN_Hash_Should_Match()
        {
            var hasher = new ScryptN(new [] { Tuple.Create(2048L, 1389306217L) });
            var result = hasher.Digest(testValue).ToHexString();

            Assert.Equal("75d08b4c639645f3f1e15c7c412160867821441d365a7bbe3edf2c6b852ccb59", result);
        }
Пример #2
0
        public void ScryptN_Hash_Should_Throw_On_Null_Input()
        {
            var clock = new MockMasterClock {
                CurrentTime = new DateTime(2017, 10, 16)
            };
            var hasher = new ScryptN(clock);

            Assert.Throws <ArgumentNullException>(() => hasher.Digest(null));
        }
Пример #3
0
        public void ScryptN_Hash()
        {
            var clock = new MockMasterClock {
                CurrentTime = new DateTime(2017, 10, 16)
            };
            var hasher = new ScryptN(clock, new [] { Tuple.Create(2048L, 1389306217L) });
            var result = hasher.Digest(testValue).ToHexString();

            Assert.Equal("75d08b4c639645f3f1e15c7c412160867821441d365a7bbe3edf2c6b852ccb59", result);
        }
Пример #4
0
        public void ScryptN_Hash_Should_Throw_On_Null_Input()
        {
            var hasher = new ScryptN();

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