hash.pxd 518 B

123456789101112131415161718192021222324
  1. from libc.stdint cimport uint64_t
  2. DEF _SEED_LEN = 8 # sizeof(uint64_t)
  3. DEF _HLEN = _SEED_LEN * 2
  4. cdef enum:
  5. SEED_LEN = _SEED_LEN
  6. HLEN = _HLEN
  7. ctypedef uint64_t Hash64
  8. ctypedef uint64_t DoubleHash64[2]
  9. ctypedef unsigned char Hash128[_HLEN]
  10. cdef:
  11. uint64_t term_hash_seed1
  12. uint64_t term_hash_seed2SetValue
  13. unsigned char *term_hash_seed
  14. Hash128 hash128(
  15. const unsigned char *message, size_t message_size)
  16. Hash64 hash64(
  17. const unsigned char *message, size_t message_size)