~jorge/snapraid/upstream

« back to all changes in this revision

Viewing changes to tommyds/tommyhash.h

  • Committer: Andrea Mazzoleni
  • Date: 2019-05-05 07:17:05 UTC
  • Revision ID: git-v1:19c75877f1b7ca99e37f107d2c6b6b3a7a0d69c5
Allow the --force-device option to work with smart/up/down/devices

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 * \param void_key Pointer to the data to hash.
53
53
 * \param key_len Size of the data to hash.
54
54
 * \note
55
 
 * This function is endianness independent.
 
55
 * This function is endianess independent.
56
56
 * \return The hash value of 32 bits.
57
57
 */
58
58
tommy_uint32_t tommy_hash_u32(tommy_uint32_t init_val, const void* void_key, tommy_size_t key_len);
72
72
 * \param void_key Pointer to the data to hash.
73
73
 * \param key_len Size of the data to hash.
74
74
 * \note
75
 
 * This function is endianness independent.
 
75
 * This function is endianess independent.
76
76
 * \return The hash value of 64 bits.
77
77
 */
78
78
tommy_uint64_t tommy_hash_u64(tommy_uint64_t init_val, const void* void_key, tommy_size_t key_len);
79
79
 
80
80
/**
81
81
 * String hash function with a 32 bits result.
82
 
 * Implementation is based on Robert Jenkins "lookup3" hash 32 bits version,
 
82
 * Implementation is based on the the Robert Jenkins "lookup3" hash 32 bits version,
83
83
 * from http://www.burtleburtle.net/bob/hash/doobs.html, function hashlittle().
84
84
 *
85
85
 * This hash is designed to handle strings with an unknown length. If you
90
90
 * Use 0 if not relevant.
91
91
 * \param void_key Pointer to the string to hash. It has to be 0 terminated.
92
92
 * \note
93
 
 * This function is endianness independent.
 
93
 * This function is endianess independent.
94
94
 * \return The hash value of 32 bits.
95
95
 */
96
96
tommy_uint32_t tommy_strhash_u32(tommy_uint64_t init_val, const void* void_key);