1 .TH "MEMCACHED_GENERATE_HASH" "3" "January 26, 2012" "1.0.4" "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>
40 .B uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
44 .B uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
47 Compile and link with \-lmemcachedutil \-lmemcached
50 \fBmemcached_generate_hash_value()\fP allows you to hash a key using one of
51 the hash functions defined in the library. This method is provided for
52 the convenience of higher\-level language bindings and is not necessary
53 for normal memcache operations.
55 The allowed hash algorithm constants are listed in the manpage for
56 \fBmemcached_behavior_set()\fP.
58 \fBmemcached_generate_hash()\fP takes a \fBmemcached_st\fP struture
59 and produces the hash value that would have been generated based on the
60 defaults of the \fBmemcached_st structure\fP.
62 As of version 0.36 all hash methods have been placed into the library
63 libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
66 A 32\-bit integer which is the result of hashing the given key.
67 For 64\-bit hash algorithms, only the least\-significant 32 bits are
71 To find out more information please check:
72 \fI\%http://libmemcached.org/\fP
75 Brian Aker, <\fI\%brian@tangent.org\fP>
78 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
82 2011, Brian Aker DataDifferential, http://datadifferential.com/
83 .\" Generated by docutils manpage writer.