Adapted to dynamic-size blobstore

This commit is contained in:
Sebastian Messmer 2015-03-06 02:06:31 +01:00
parent 784e9e050a
commit 629eacb4b7
2 changed files with 5 additions and 1 deletions

View File

@ -25,8 +25,10 @@ using blobstore::onblocks::BlobOnBlocks;
namespace cryfs {
constexpr uint32_t CryDevice::BLOCKSIZE_BYTES;
CryDevice::CryDevice(unique_ptr<CryConfig> config, unique_ptr<BlockStore> blockStore)
: _blobStore(make_unique<BlobStoreOnBlocks>(std::move(blockStore))), _rootKey(GetOrCreateRootKey(config.get())) {
: _blobStore(make_unique<BlobStoreOnBlocks>(std::move(blockStore), BLOCKSIZE_BYTES)), _rootKey(GetOrCreateRootKey(config.get())) {
}
Key CryDevice::GetOrCreateRootKey(CryConfig *config) {

View File

@ -17,6 +17,8 @@ namespace bf = boost::filesystem;
class CryDevice: public fspp::Device {
public:
static constexpr uint32_t BLOCKSIZE_BYTES = 4096;
CryDevice(std::unique_ptr<CryConfig> config, std::unique_ptr<blockstore::BlockStore> blockStore);
virtual ~CryDevice();