Free port logic
[m6w6/libmemcached] / docs / man / memcached_generate_hash.3
1 .TH "MEMCACHED_GENERATE_HASH" "3" "October 18, 2011" "1.01" "libmemcached"
2 .SH NAME
3 memcached_generate_hash \- 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 uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
41 .UNINDENT
42 .INDENT 0.0
43 .TP
44 .B uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
45 .UNINDENT
46 .sp
47 Compile and link with \-lmemcachedutil \-lmemcached
48 .SH DESCRIPTION
49 .sp
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.
54 .sp
55 The allowed hash algorithm constants are listed in the manpage for
56 \fBmemcached_behavior_set()\fP.
57 .sp
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.
61 .sp
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.
64 .SH RETURN
65 .sp
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
68 returned.
69 .SH HOME
70 .sp
71 To find out more information please check:
72 \fI\%http://libmemcached.org/\fP
73 .SH AUTHOR
74 .sp
75 Brian Aker, <\fI\%brian@tangent.org\fP>
76 .SH SEE ALSO
77 .sp
78 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
79 .SH AUTHOR
80 Brian Aker
81 .SH COPYRIGHT
82 2011, Brian Aker DataDifferential, http://datadifferential.com/
83 .\" Generated by docutils manpage writer.
84 .\"
85 .