Examples of IncrementalHasher32


Examples of com.fasterxml.storemate.shared.hash.IncrementalHasher32

    public static IncrementalHasher32 startChecksum() {
      return new IncrementalMurmur3Hasher();
    }

    public static IncrementalHasher32 startChecksum(byte[] data, int offset, int len) {
        IncrementalHasher32 hasher = startChecksum();
        hasher.update(data, offset, len);
        return hasher;
    }
View Full Code Here

Examples of com.fasterxml.storemate.shared.hash.IncrementalHasher32

        assertEquals(6L, in.readCount());
        assertEquals(2L, in.skipCount());

        // and then hash... have to count
        int exp = calcChecksum32(INPUT, 0, 6);
        IncrementalHasher32 hasher = in.getHasher();
        assertNotNull(hasher);
        assertEquals(exp, hasher.calculateHash());
       
        in.close();
    }
View Full Code Here

Examples of com.fasterxml.storemate.shared.hash.IncrementalHasher32

        out.write(INPUT, 0, 7);
        out.write(8);

        assertEquals(8, out.count());
        int exp = calcChecksum32(INPUT);
        IncrementalHasher32 hasher = out.getHasher();
        assertNotNull(hasher);
        assertEquals(exp, hasher.calculateHash());
       
        out.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.