Adapt to new blockstore
This commit is contained in:
parent
54e0bbc7d3
commit
7b40e22279
@ -1,3 +1,4 @@
|
||||
#include <messmer/blockstore/implementations/caching/CachingBlockStore.h>
|
||||
#include "impl/DirBlob.h"
|
||||
#include "CryDevice.h"
|
||||
|
||||
@ -8,7 +9,6 @@
|
||||
#include "messmer/blobstore/implementations/onblocks/BlobStoreOnBlocks.h"
|
||||
#include "messmer/blobstore/implementations/onblocks/BlobOnBlocks.h"
|
||||
#include "messmer/blockstore/implementations/encrypted/EncryptedBlockStore.h"
|
||||
#include "messmer/blockstore/implementations/caching2/Caching2BlockStore.h"
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
||||
@ -23,14 +23,14 @@ using blockstore::Key;
|
||||
using blockstore::encrypted::EncryptedBlockStore;
|
||||
using blobstore::onblocks::BlobStoreOnBlocks;
|
||||
using blobstore::onblocks::BlobOnBlocks;
|
||||
using blockstore::caching2::Caching2BlockStore;
|
||||
using blockstore::caching::CachingBlockStore;
|
||||
|
||||
namespace cryfs {
|
||||
|
||||
constexpr uint32_t CryDevice::BLOCKSIZE_BYTES;
|
||||
|
||||
CryDevice::CryDevice(unique_ptr<CryConfig> config, unique_ptr<BlockStore> blockStore)
|
||||
: _blobStore(make_unique<BlobStoreOnBlocks>(make_unique<Caching2BlockStore>(make_unique<EncryptedBlockStore>(std::move(blockStore), config->EncryptionKey())), BLOCKSIZE_BYTES)), _rootKey(GetOrCreateRootKey(config.get())) {
|
||||
: _blobStore(make_unique<BlobStoreOnBlocks>(make_unique<CachingBlockStore>(make_unique<EncryptedBlockStore>(std::move(blockStore), config->EncryptionKey())), BLOCKSIZE_BYTES)), _rootKey(GetOrCreateRootKey(config.get())) {
|
||||
}
|
||||
|
||||
Key CryDevice::GetOrCreateRootKey(CryConfig *config) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user