.TH "MEMCACHED_GENERATE_HASH" "3" "June 17, 2011" "0.49" "libmemcached"
.SH NAME
memcached_generate_hash \- Generating hash values directly
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructeredText.
.
.sp
Hash a key value
.SH SYNOPSIS
.sp
#include <libmemcached/memcached.h>
.INDENT 0.0
.TP
.B uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
.UNINDENT
.INDENT 0.0
.TP
.B uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
.UNINDENT
.sp
Compile and link with \-lmemcachedutil \-lmemcached
.SH DESCRIPTION
.sp
memcached_generate_hash_value() allows you to hash a key using one of
the hash functions defined in the library. This method is provided for
the convenience of higher\-level language bindings and is not necessary
for normal memcache operations.
.sp
The allowed hash algorithm constants are listed in the manpage for
memcached_behavior_set().
.sp
memcached_generate_hash() takes a memcached_st struture and produces
the hash value that would have been generated based on the defaults
of the memcached_st structure.
.sp
As of version 0.36 all hash methods have been placed into the library
libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
.SH RETURN
.sp
A 32\-bit integer which is the result of hashing the given key.
For 64\-bit hash algorithms, only the least\-significant 32 bits are
returned.
.SH HOME
.sp
To find out more information please check:
\fI\%http://libmemcached.org/\fP
.SH AUTHOR
.sp
Brian Aker, <\fI\%brian@tangent.org\fP>
.SH SEE ALSO
.sp
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
.SH AUTHOR
Brian Aker
.SH COPYRIGHT
2011, Brian Aker DataDifferential, http://datadifferential.com/
.\" Generated by docutils manpage writer.
.\" 
.