HashFunction implementation of SipHash-c-d.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int | |
| private final long | |
| private final long | |
| private static final long | |
| pack-priv static final HashFunction |
| Access | Constructor and Description |
|---|---|
| pack-priv | SipHashFunction(int
the number of compression rounds (must be positive) c, int the number of finalization rounds (must be positive) d, long the first half of the key k0, long the second half of the key k1)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | bits()
Implements com. |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. |
| public int | |
| public Hasher | newHasher()
Implements com. Hasher
instance that is ready to receive data.
|
| public String |
| c | back to summary |
|---|---|
| private final int c | |
| d | back to summary |
|---|---|
| private final int d | |
| k0 | back to summary |
|---|---|
| private final long k0 | |
| k1 | back to summary |
|---|---|
| private final long k1 | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SIP_HASH_24 | back to summary |
|---|---|
| pack-priv static final HashFunction SIP_HASH_24 | |
| SipHashFunction | back to summary |
|---|---|
pack-priv SipHashFunction(int c, int d, long k0, long k1)
| |
| bits | back to summary |
|---|---|
| public int bits() Implements com. Doc from com. Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| newHasher | back to summary |
|---|---|
| public Hasher newHasher() Implements com. Doc from com. Begins a new hash code computation by returning an initialized, stateful
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private final int | |
| private static final int | |
| private final int | |
| private long | |
| private long | |
| private long | |
| private long | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected HashCode | makeHash()
Implements abstract com. |
| protected void | process(ByteBuffer buffer)
Implements abstract com. chunk bytes).
|
| private void | |
| protected void | processRemaining(ByteBuffer buffer)
Overrides com. |
| private void |
| b | back to summary |
|---|---|
| private long b | |
| c | back to summary |
|---|---|
| private final int c | |
| CHUNK_SIZE | back to summary |
|---|---|
| private static final int CHUNK_SIZE | |
| d | back to summary |
|---|---|
| private final int d | |
| finalM | back to summary |
|---|---|
| private long finalM | |
| v0 | back to summary |
|---|---|
| private long v0 | |
| v1 | back to summary |
|---|---|
| private long v1 | |
| v2 | back to summary |
|---|---|
| private long v2 | |
| v3 | back to summary |
|---|---|
| private long v3 | |
| SipHasher | back to summary |
|---|---|
| pack-priv SipHasher(int c, int d, long k0, long k1) | |
| makeHash | back to summary |
|---|---|
| protected HashCode makeHash() Implements abstract com. Doc from com. Computes a hash code based on the data that have been provided to this hasher. This is called
after all chunks are handled with
| |
| process | back to summary |
|---|---|
| protected void process(ByteBuffer buffer) Implements abstract com. Doc from com. Processes the available bytes of the buffer (at most
| |
| processM | back to summary |
|---|---|
| private void processM(long m) | |
| processRemaining | back to summary |
|---|---|
| protected void processRemaining(ByteBuffer buffer) Overrides com. Doc from com. This is invoked for the last bytes of the input, which are not enough to fill a whole chunk.
The passed This implementation simply pads with zeros and delegates to
| |
| sipRound | back to summary |
|---|---|
| private void sipRound(int iterations) | |