1 .TH "MEMCACHED_GENERATE_HASH" "3" "July 31, 2012" "1.0.10" "libmemcached"
3 memcached_generate_hash \- Generating hash values directly
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
37 #include <libmemcached/memcached.h>
44 .B uint32_t memcached_generate_hash_value(const char\fI\ *key\fP, size_t\fI\ key_length\fP, \fI\%memcached_hash_t\fP\fI\ hash_algorithm\fP)
48 .B uint32_t memcached_generate_hash(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP)
52 .B MEMCACHED_HASH_DEFAULT
64 .B MEMCACHED_HASH_FNV1_64
68 .B MEMCACHED_HASH_FNV1A_64
72 .B MEMCACHED_HASH_FNV1_32
76 .B MEMCACHED_HASH_FNV1A_32
80 .B MEMCACHED_HASH_JENKINS
84 .B MEMCACHED_HASH_MURMUR
88 .B MEMCACHED_HASH_HSIEH
91 Compile and link with \-lmemcachedutil \-lmemcached
94 \fI\%memcached_generate_hash_value()\fP allows you to hash a key using one of
95 the hash functions defined in the library. This method is provided for
96 the convenience of higher\-level language bindings and is not necessary
97 for normal memcache operations.
99 The allowed hash algorithm constants are listed in the manpage for
100 \fBmemcached_behavior_set()\fP.
102 \fI\%memcached_generate_hash()\fP takes a \fBmemcached_st\fP struture
103 and produces the hash value that would have been generated based on the
104 defaults of \fBmemcached_st\fP.
106 As of version 0.36 all hash methods have been placed into the library
107 libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
110 A 32\-bit integer which is the result of hashing the given key.
111 For 64\-bit hash algorithms, only the least\-significant 32 bits are
115 To find out more information please check:
116 \fI\%http://libmemcached.org/\fP
119 Brian Aker, <\fI\%brian@tangent.org\fP>
122 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
126 2011, Brian Aker DataDifferential, http://datadifferential.com/
127 .\" Generated by docutils manpage writer.