#ifndef _FS_CEPH_CRYPTO_H
#define _FS_CEPH_CRYPTO_H

#include <linux/ceph/types.h>
#include <linux/ceph/buffer.h>

/*
 * cryptographic secret
 */
struct ceph_crypto_key {
	int type;
	struct ceph_timespec created;
	int len;
	void *key;
	struct crypto_skcipher *tfm;
};

int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
			  const struct ceph_crypto_key *src);
int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
void ceph_crypto_key_destroy(struct ceph_crypto_key *key);

/* crypto.c */
int ceph_crypt(const struct ceph_crypto_key *key, bool encrypt,
	       void *buf, int buf_len, int in_len, int *pout_len);
int ceph_crypto_init(void);
void ceph_crypto_shutdown(void);

/* armor.c */
int ceph_armor(char *dst, const char *src, const char *end);
int ceph_unarmor(char *dst, const char *src, const char *end);

#endif
up'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=52f5631a4c056ad01682393be56d2be237e81610'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/net/rose/rose_out.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/net/rose/rose_out.c?id=52f5631a4c056ad01682393be56d2be237e81610'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/net/rose/rose_out.c?id=52f5631a4c056ad01682393be56d2be237e81610'>commit</a><a class='active' href='/cgit.cgi/linux/net-next.git/diff/net/rose/rose_out.c?id=52f5631a4c056ad01682393be56d2be237e81610'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/rose/rose_out.c'>
<input type='hidden' name='id' value='52f5631a4c056ad01682393be56d2be237e81610'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/diff/?id=52f5631a4c056ad01682393be56d2be237e81610'>root</a>/<a href='/cgit.cgi/linux/net-next.git/diff/net?id=52f5631a4c056ad01682393be56d2be237e81610'>net</a>/<a href='/cgit.cgi/linux/net-next.git/diff/net/rose?id=52f5631a4c056ad01682393be56d2be237e81610'>rose</a>/<a href='/cgit.cgi/linux/net-next.git/diff/net/rose/rose_out.c?id=52f5631a4c056ad01682393be56d2be237e81610'>rose_out.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='52f5631a4c056ad01682393be56d2be237e81610'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=52f5631a4c056ad01682393be56d2be237e81610'>Diffstat</a> (limited to 'net/rose/rose_out.c')</div><table summary='diffstat' class='diffstat'>