Documentation ¶
Index ¶
- Constants
- Variables
- func GenCustomSecret(customSecret []byte, seed64 uint64)
- func Hash_64bits(input []byte) uint64
- func Hash_64bits_internal(acc []uint64, input []byte, seed64 uint64, secret []byte) uint64
- func Hash_64bits_withSecret(input []byte, secret []byte) uint64
- func Hash_64bits_withSecretandSeed(input []byte, secret []byte, seed uint64) uint64
- func Hash_64bits_withSeed(input []byte, seed uint64) uint64
- func Hash_hashLong_64b_withSecret(input []byte, seed64 uint64, secret []byte) uint64
- func Hash_hashLong_64bits_internal(acc []uint64, input []byte, secret []byte) uint64
- func New64() hash.Hash64
- func New64WithSecret(secret []byte) (hash.Hash64, error)
- func New64WithSeed(seed uint64) hash.Hash64
- func Sum128(input []byte) (out [Size128]byte)
- func Sum128WithSeed(input []byte, seed uint64) (out [Size128]byte)
- func Sum64(input []byte) (out [Size64]byte)
- func Sum64WithSeed(input []byte, seed uint64) (out [Size64]byte)
- type Hash128
- type Uint128
- func Hash_128bits(input []byte) Uint128
- func Hash_128bits_internal(input []byte, seed64 uint64, secret []byte, f_hl128 hashLong128_f) Uint128
- func Hash_128bits_withSecret(input []byte, secret []byte) Uint128
- func Hash_128bits_withSecretandSeed(input []byte, secret []byte, seed uint64) Uint128
- func Hash_128bits_withSeed(input []byte, seed uint64) Uint128
- func Hash_hashLong_128b_default(input []byte, seed64 uint64, secret []byte) Uint128
- func Hash_hashLong_128b_internal(acc []uint64, input []byte, secret []byte) Uint128
- func Hash_hashLong_128b_withSecret(input []byte, seed64 uint64, secret []byte) Uint128
- func Hash_hashLong_128b_withSeed(input []byte, seed64 uint64, secret []byte) Uint128
- func Hash_hashLong_128b_withSeed_internal(acc []uint64, input []byte, seed64 uint64) Uint128
Constants ¶
View Source
const ( PRIME32_1 = 0x9E3779B1 /*!< 0b10011110001101110111100110110001 */ PRIME32_2 = 0x85EBCA77 /*!< 0b10000101111010111100101001110111 */ PRIME32_3 = 0xC2B2AE3D /*!< 0b11000010101100101010111000111101 */ PRIME32_4 = 0x27D4EB2F /*!< 0b00100111110101001110101100101111 */ PRIME32_5 = 0x165667B1 /*!< 0b00010110010101100110011110110001 */ )
View Source
const ( PRIME64_1 uint64 = 0x9E3779B185EBCA87 // 0b1001111000110111011110011011000110000101111010111100101010000111 PRIME64_2 uint64 = 0xC2B2AE3D27D4EB4F // 0b1100001010110010101011100011110100100111110101001110101101001111 PRIME64_3 uint64 = 0x165667B19E3779F9 // 0b0001011001010110011001111011000110011110001101110111100111111001 PRIME64_4 uint64 = 0x85EBCA77C2B2AE63 // 0b1000010111101011110010100111011111000010101100101010111001100011 PRIME64_5 uint64 = 0x27D4EB2F165667C5 // 0b0010011111010100111010110010111100010110010101100110011111000101 )
View Source
const ( PRIME_MX1 uint64 = 0x165667919E3779F9 /*!< 0b0001011001010110011001111001000110011110001101110111100111111001 */ PRIME_MX2 uint64 = 0x9FB21C651E98DF25 /*!< 0b1001111110110010000111000110010100011110100110001101111100100101 */ )
View Source
const ACC_NB = STRIPE_LEN / 8 // 8 = unsafe.Sizeof(uint64)
View Source
const BlockSize128 = 256
The blocksize of xxh3_128 hash function in bytes
View Source
const BlockSize64 = 256
The blocksize of xxh3_64 hash function in bytes
View Source
const INTERNALBUFFER_SIZE = 256
View Source
const INTERNALBUFFER_STRIPES = INTERNALBUFFER_SIZE / STRIPE_LEN // 4
View Source
const KEYSET_DEFAULT_SIZE = 48 /* minimum 32 */
View Source
const MIDSIZE_LASTOFFSET = 17
View Source
const MIDSIZE_MAX = 240
View Source
const MIDSIZE_STARTOFFSET = 3
View Source
const SECRET_CONSUME_RATE = 8
View Source
const SECRET_DEFAULT_SIZE = 192
View Source
const SECRET_LASTACC_START = 7
View Source
const SECRET_MERGEACCS_START = 11
View Source
const SECRET_SIZE_MIN = 136
View Source
const STRIPE_LEN = 64
View Source
const Size128 = 16
The size of a xxh3_128 hash value in bytes
View Source
const Size64 = 8
The size of a xxh3_64 hash value in bytes
Variables ¶
Functions ¶
func GenCustomSecret ¶
func Hash_64bits ¶
func Hash_64bits_internal ¶
func Hash_64bits_withSecret ¶
func Hash_64bits_withSeed ¶
func New64WithSecret ¶
New64WithSecret returns a new hash.Hash64 computing the echo checksum
func New64WithSeed ¶
New64WithSeed returns a new hash.Hash64 computing the echo checksum
func Sum128WithSeed ¶
Checksum returns the 128bits Hash value.
Types ¶
type Hash128 ¶
Hash128
func New128WithSecret ¶
New128WithSecret returns a new Hash128 computing the echo checksum
func New128WithSeed ¶
New128WithSeed returns a new Hash128 computing the echo checksum
type Uint128 ¶
type Uint128 struct {
Low, High uint64
}
XXH128_hash_t
func Hash_128bits ¶
func Hash_128bits_internal ¶
func Hash_128bits_withSecret ¶
func Hash_128bits_withSeed ¶
Click to show internal directories.
Click to hide internal directories.