mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
libceph: introduce ceph_x_encrypt_offset()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
462e650451
commit
55d9cc834f
1 changed files with 6 additions and 2 deletions
|
@ -39,10 +39,14 @@ static int ceph_x_should_authenticate(struct ceph_auth_client *ac)
|
|||
return need != 0;
|
||||
}
|
||||
|
||||
static int ceph_x_encrypt_offset(void)
|
||||
{
|
||||
return sizeof(u32) + sizeof(struct ceph_x_encrypt_header);
|
||||
}
|
||||
|
||||
static int ceph_x_encrypt_buflen(int ilen)
|
||||
{
|
||||
return sizeof(struct ceph_x_encrypt_header) + ilen + 16 +
|
||||
sizeof(u32);
|
||||
return ceph_x_encrypt_offset() + ilen + 16;
|
||||
}
|
||||
|
||||
static int ceph_x_encrypt(struct ceph_crypto_key *secret,
|
||||
|
|
Loading…
Reference in a new issue