]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/librbd/mock/crypto/MockCryptoInterface.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / librbd / mock / crypto / MockCryptoInterface.h
index 027ebde627cdecb7d63fe9ae40f31ea6234d8d58..0e3b003ca072c69013d426ddd9ebee88ccd92a81 100644 (file)
@@ -13,17 +13,20 @@ namespace crypto {
 
 struct MockCryptoInterface : CryptoInterface {
 
+  static const uint64_t BLOCK_SIZE = 4096;
+  static const uint64_t DATA_OFFSET = 4 * 1024 * 1024;
+
   MOCK_METHOD2(encrypt, int(ceph::bufferlist*, uint64_t));
   MOCK_METHOD2(decrypt, int(ceph::bufferlist*, uint64_t));
   MOCK_CONST_METHOD0(get_key, const unsigned char*());
   MOCK_CONST_METHOD0(get_key_length, int());
 
   uint64_t get_block_size() const override {
-    return 4096;
+    return BLOCK_SIZE;
   }
 
   uint64_t get_data_offset() const override {
-    return 4 * 1024 * 1024;
+    return DATA_OFFSET;
   }
 };