Package com.fasterxml.storemate.shared.hash

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


        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

        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

Related Classes of com.fasterxml.storemate.shared.hash.IncrementalHasher32

Copyright © 2018 www.massapicom. 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.