Package org.greenrobot.essentials.hash
Class FNV64
- java.lang.Object
-
- org.greenrobot.essentials.hash.FNV64
-
- All Implemented Interfaces:
java.util.zip.Checksum
public class FNV64 extends java.lang.Object implements java.util.zip.ChecksumHash function FNV-1a (http://www.isthe.com/chongo/tech/comp/fnv).
-
-
Field Summary
Fields Modifier and Type Field Description private longhashprivate static longINITIAL_VALUEprivate static longMULTIPLIER
-
Constructor Summary
Constructors Constructor Description FNV64()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetValue()voidreset()voidupdate(byte[] b, int off, int len)voidupdate(int b)
-
-
-
Field Detail
-
INITIAL_VALUE
private static final long INITIAL_VALUE
- See Also:
- Constant Field Values
-
MULTIPLIER
private static final long MULTIPLIER
- See Also:
- Constant Field Values
-
hash
private long hash
-
-
Method Detail
-
update
public void update(int b)
- Specified by:
updatein interfacejava.util.zip.Checksum
-
update
public void update(byte[] b, int off, int len)- Specified by:
updatein interfacejava.util.zip.Checksum
-
getValue
public long getValue()
- Specified by:
getValuein interfacejava.util.zip.Checksum
-
reset
public void reset()
- Specified by:
resetin interfacejava.util.zip.Checksum
-
-