Merge in documentation updates.
[awesomized/libmemcached] / docs / memcached_generate_hash_value.rst
1 .. highlight:: perl
2
3
4 memcached_generate_hash_value
5 ---------------------------**
6
7
8 Hash a key value
9
10
11 *******
12 LIBRARY
13 *******
14
15
16 C Client Library for memcached (libmemcached, -lmemcached)
17
18
19 --------
20 SYNOPSIS
21 --------
22
23
24
25 .. code-block:: perl
26
27 #include <libmemcached/memcached.h>
28
29 uint32_t
30 memcached_generate_hash_value (const char *key,
31 size_t key_length,
32 memcached_hash_t hash_algorithm);
33
34 uint32_t
35 memcached_generate_hash (memcached_st *ptr,
36 const char *key,
37 size_t key_length);
38
39
40
41 -----------
42 DESCRIPTION
43 -----------
44
45
46 memcached_generate_hash_value() allows you to hash a key using one of
47 the hash functions defined in the library. This method is provided for
48 the convenience of higher-level language bindings and is not necessary
49 for normal memcache operations.
50
51 The allowed hash algorithm constants are listed in the manpage for
52 memcached_behavior_set().
53
54 memcached_generate_hash() takes a memcached_st struture and produces
55 the hash value that would have been generated based on the defaults
56 of the memcached_st structure.
57
58 As of version 0.36 all hash methods have been placed into the library
59 libmemcached(3) which is linked with libmemcached(3).
60
61
62 ******
63 RETURN
64 ******
65
66
67 A 32-bit integer which is the result of hashing the given key.
68 For 64-bit hash algorithms, only the least-significant 32 bits are
69 returned.
70
71
72 ****
73 HOME
74 ****
75
76
77 To find out more information please check:
78 `https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
79
80
81 ******
82 AUTHOR
83 ******
84
85
86 Brian Aker, <brian@tangent.org>
87
88
89 --------
90 SEE ALSO
91 --------
92
93
94 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`