Lines Matching refs:p
77 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_encode() argument
79 if (*p + sizeof(u16) + sizeof(key->created) + in ceph_crypto_key_encode()
82 ceph_encode_16(p, key->type); in ceph_crypto_key_encode()
83 ceph_encode_copy(p, &key->created, sizeof(key->created)); in ceph_crypto_key_encode()
84 ceph_encode_16(p, key->len); in ceph_crypto_key_encode()
85 ceph_encode_copy(p, key->key, key->len); in ceph_crypto_key_encode()
89 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end) in ceph_crypto_key_decode() argument
93 ceph_decode_need(p, end, 2*sizeof(u16) + sizeof(key->created), bad); in ceph_crypto_key_decode()
94 key->type = ceph_decode_16(p); in ceph_crypto_key_decode()
95 ceph_decode_copy(p, &key->created, sizeof(key->created)); in ceph_crypto_key_decode()
96 key->len = ceph_decode_16(p); in ceph_crypto_key_decode()
97 ceph_decode_need(p, end, key->len, bad); in ceph_crypto_key_decode()
98 ret = set_secret(key, *p); in ceph_crypto_key_decode()
99 memzero_explicit(*p, key->len); in ceph_crypto_key_decode()
100 *p += key->len; in ceph_crypto_key_decode()
112 void *buf, *p; in ceph_crypto_key_unarmor() local
125 p = buf; in ceph_crypto_key_unarmor()
126 ret = ceph_crypto_key_decode(key, &p, p + blen); in ceph_crypto_key_unarmor()
303 void *p; in ceph_key_preparse() local
315 p = (void *)prep->data; in ceph_key_preparse()
316 ret = ceph_crypto_key_decode(ckey, &p, (char*)prep->data+datalen); in ceph_key_preparse()