提交 55d9cc83 编写于 作者: I Ilya Dryomov

libceph: introduce ceph_x_encrypt_offset()

Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
Reviewed-by: NSage Weil <sage@redhat.com>
上级 462e6504
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册