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