Merge pull request #140 from hussainnaqvee/patch-1
[awesomized/libmemcached] / libmemcached / memcached_set_encoding_key.rst
1 Set encryption key
2 ==================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
9
10 .. function:: memcached_return_t memcached_set_encoding_key (memcached_st *ptr, const char *str, const size_t length)
11
12 :param ptr: pointer to initialized `memcached_st` struct
13 :param str: the key to use
14 :param length: the length of `key` without any terminating zero
15 :returns: `memcached_return_t` indicating success
16
17 DESCRIPTION
18 -----------
19
20 :func:`memcached_set_encoding_key` sets the key that will be used to encrypt and
21 decrypt data as it is sent and received from the server.
22
23 Currently only AES is is supported.
24
25 RETURN VALUE
26 ------------
27
28 A value of type :type:`memcached_return_t` is returned.
29 On success that value will be `MEMCACHED_SUCCESS`.
30 Use :func:`memcached_strerror` to translate this value to a printable string.
31
32 SEE ALSO
33 --------
34
35 .. only:: man
36
37 :manpage:`memcached(1)`
38 :manpage:`libmemcached(3)`
39 :manpage:`memcached_strerror(3)`
40
41 .. only:: html
42
43 * :manpage:`memcached(1)`
44 * :doc:`../libmemcached`
45 * :doc:`memcached_strerror`