Пример #1
0
        public void iterated_of_hello_world()
        {
            var buf    = Encoding.UTF8.GetBytes("Hello, world!");
            var hasher = BlockHasher.Create();

            hasher.Update(buf.AsSpan(0, 8));
            hasher.Update(buf.AsSpan(8));
            var h = hasher.Final();

            Assert.Equal(new Hash("307EA73B830D76AD85ED617FADBD655C"), h);
        }
Пример #2
0
 public BlittableWriter(Scratch scratch, uint realm)
 {
     _scratch = scratch;
     _realm   = realm;
     _hasher  = BlockHasher.Create();
 }