Documentation ¶
Index ¶
- Variables
- func NewHashFunction(seed uint32) interfaces.HashFunction
- func NewHasher(seed uint32) interfaces.Hasher
- type HashFunction
- type Hasher
- func (h *Hasher) Hash() hashcode.HashCode
- func (h *Hasher) PutBool(b bool) interfaces.Hasher
- func (h *Hasher) PutByte(b byte) interfaces.Hasher
- func (h *Hasher) PutBytes(bytes []byte) interfaces.Hasher
- func (h *Hasher) PutFloat32(f float32) interfaces.Hasher
- func (h *Hasher) PutFloat64(f float64) interfaces.Hasher
- func (h *Hasher) PutString(s string) interfaces.Hasher
- func (h *Hasher) PutUint32(i uint32) interfaces.Hasher
- func (h *Hasher) PutUint64(i uint64) interfaces.Hasher
- func (h *Hasher) Size() int
Constants ¶
This section is empty.
Variables ¶
View Source
var Zhf = NewHashFunction(0)
Zhf seed为0的HashFunction
Functions ¶
func NewHashFunction ¶
func NewHashFunction(seed uint32) interfaces.HashFunction
func NewHasher ¶
func NewHasher(seed uint32) interfaces.Hasher
Types ¶
type HashFunction ¶
type HashFunction struct {
// contains filtered or unexported fields
}
func (*HashFunction) HashString ¶
func (hf *HashFunction) HashString(data string) hashcode.HashCode
func (*HashFunction) NewHasher ¶
func (hf *HashFunction) NewHasher() interfaces.Hasher
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
func (*Hasher) PutFloat32 ¶
func (h *Hasher) PutFloat32(f float32) interfaces.Hasher
func (*Hasher) PutFloat64 ¶
func (h *Hasher) PutFloat64(f float64) interfaces.Hasher
Click to show internal directories.
Click to hide internal directories.