Package generic.hash
Class FNV1a32MessageDigest
- java.lang.Object
- 
- generic.hash.AbstractMessageDigest
- 
- generic.hash.FNV1a32MessageDigest
 
 
- 
- All Implemented Interfaces:
- MessageDigest
 
 public class FNV1a32MessageDigest extends AbstractMessageDigest 
- 
- 
Field SummaryFields Modifier and Type Field Description static intFNV_32_OFFSET_BASISstatic intFNV_32_PRIME- 
Fields inherited from class generic.hash.AbstractMessageDigestalgorithm, digestLength
 
- 
 - 
Constructor SummaryConstructors Constructor Description FNV1a32MessageDigest()FNV1a32MessageDigest(int initialVector)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intdigest(byte[] buf, int offset, int len)Completes the hash computation by performing final operations such as padding.longdigestLong()Completes the hash computation by performing final operations such as padding, and returns (up to) the first 8 bytes as a big-endian long value.voidreset()Resets the digest for further use.voidupdate(byte input)Updates the digest using the specified byte.voidupdate(byte[] input, int offset, int len)You REALLY want to override this method.voidupdate(byte[] input, int offset, int len, TaskMonitor monitor)You REALLY want to override this method too.- 
Methods inherited from class generic.hash.AbstractMessageDigestdigest, getAlgorithm, getDigestLength, update, update, update, update, update
 
- 
 
- 
- 
- 
Field Detail- 
FNV_32_OFFSET_BASISpublic static final int FNV_32_OFFSET_BASIS - See Also:
- Constant Field Values
 
 - 
FNV_32_PRIMEpublic static final int FNV_32_PRIME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
updatepublic void update(byte[] input, int offset, int len)Description copied from class:AbstractMessageDigestYou REALLY want to override this method.- Specified by:
- updatein interface- MessageDigest
- Overrides:
- updatein class- AbstractMessageDigest
- Parameters:
- input- the array of bytes
- offset- the offset to start from in the array of bytes
- len- the number of bytes to use, starting at offset
 
 - 
updatepublic void update(byte[] input, int offset, int len, TaskMonitor monitor)Description copied from class:AbstractMessageDigestYou REALLY want to override this method too.- Specified by:
- updatein interface- MessageDigest
- Overrides:
- updatein class- AbstractMessageDigest
- Parameters:
- input- the array of bytes
- offset- the offset to start from in the array of bytes
- len- the number of bytes to use, starting at offset
- monitor- the monitor to check during loops
 
 - 
updatepublic void update(byte input) Description copied from interface:MessageDigestUpdates the digest using the specified byte.- Parameters:
- input- the byte with which to update the digest
 
 - 
digestpublic int digest(byte[] buf, int offset, int len)Description copied from interface:MessageDigestCompletes the hash computation by performing final operations such as padding. The digest is reset after this call is made.- Parameters:
- buf- output buffer for the computed digest
- offset- offset into the output buffer to begin storing the digest
- len- number of bytes within buf allocated for the digest
- Returns:
- the number of bytes placed into buf
 
 - 
digestLongpublic long digestLong() Description copied from interface:MessageDigestCompletes the hash computation by performing final operations such as padding, and returns (up to) the first 8 bytes as a big-endian long value. The digest is reset after this call is made.- Returns:
- the digest value as a long value
 
 - 
resetpublic void reset() Description copied from interface:MessageDigestResets the digest for further use.
 
- 
 
-