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