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;
}
};