]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/crypto/Utils.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / librbd / crypto / Utils.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_LIBRBD_CRYPTO_UTILS_H
5 #define CEPH_LIBRBD_CRYPTO_UTILS_H
6
7 #include "include/Context.h"
8 #include "librbd/crypto/CryptoInterface.h"
9
10 namespace librbd {
11
12 struct ImageCtx;
13
14 namespace crypto {
15 namespace util {
16
17 template <typename ImageCtxT = librbd::ImageCtx>
18 void set_crypto(ImageCtxT *image_ctx, ceph::ref_t<CryptoInterface> crypto);
19
20 int build_crypto(
21 CephContext* cct, const unsigned char* key, uint32_t key_length,
22 uint64_t block_size, uint64_t data_offset,
23 ceph::ref_t<CryptoInterface>* result_crypto);
24
25 } // namespace util
26 } // namespace crypto
27 } // namespace librbd
28
29 #endif // CEPH_LIBRBD_CRYPTO_UTILS_H