jenkins-promote-staging-trunk-libmemcached-15
[awesomized/libmemcached] / docs / man / memcached_generate_hash_value.3
1 .TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "April 28, 2012" "1.0.7" "libmemcached"
2 .SH NAME
3 memcached_generate_hash_value \- Generating hash values directly
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
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
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .sp
34 Hash a key value
35 .SH SYNOPSIS
36 .sp
37 #include <libmemcached/memcached.h>
38 .INDENT 0.0
39 .TP
40 .B memcached_hash_t
41 .UNINDENT
42 .INDENT 0.0
43 .TP
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)
45 .UNINDENT
46 .INDENT 0.0
47 .TP
48 .B uint32_t memcached_generate_hash(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP)
49 .UNINDENT
50 .INDENT 0.0
51 .TP
52 .B MEMCACHED_HASH_DEFAULT
53 .UNINDENT
54 .INDENT 0.0
55 .TP
56 .B MEMCACHED_HASH_MD5
57 .UNINDENT
58 .INDENT 0.0
59 .TP
60 .B MEMCACHED_HASH_CRC
61 .UNINDENT
62 .INDENT 0.0
63 .TP
64 .B MEMCACHED_HASH_FNV1_64
65 .UNINDENT
66 .INDENT 0.0
67 .TP
68 .B MEMCACHED_HASH_FNV1A_64
69 .UNINDENT
70 .INDENT 0.0
71 .TP
72 .B MEMCACHED_HASH_FNV1_32
73 .UNINDENT
74 .INDENT 0.0
75 .TP
76 .B MEMCACHED_HASH_FNV1A_32
77 .UNINDENT
78 .INDENT 0.0
79 .TP
80 .B MEMCACHED_HASH_JENKINS
81 .UNINDENT
82 .INDENT 0.0
83 .TP
84 .B MEMCACHED_HASH_MURMUR
85 .UNINDENT
86 .INDENT 0.0
87 .TP
88 .B MEMCACHED_HASH_HSIEH
89 .UNINDENT
90 .sp
91 Compile and link with \-lmemcachedutil \-lmemcached
92 .SH DESCRIPTION
93 .sp
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.
98 .sp
99 The allowed hash algorithm constants are listed in the manpage for
100 \fBmemcached_behavior_set()\fP.
101 .sp
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.
105 .sp
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.
108 .SH RETURN
109 .sp
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
112 returned.
113 .SH HOME
114 .sp
115 To find out more information please check:
116 \fI\%http://libmemcached.org/\fP
117 .SH AUTHOR
118 .sp
119 Brian Aker, <\fI\%brian@tangent.org\fP>
120 .SH SEE ALSO
121 .sp
122 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
123 .SH AUTHOR
124 Brian Aker
125 .SH COPYRIGHT
126 2011, Brian Aker DataDifferential, http://datadifferential.com/
127 .\" Generated by docutils manpage writer.
128 .\"
129 .