diff --git a/src/CryDevice.cpp b/src/CryDevice.cpp index 550c7c66..48c2b2b3 100644 --- a/src/CryDevice.cpp +++ b/src/CryDevice.cpp @@ -56,6 +56,8 @@ CryDevice::Cipher::EncryptionKey CryDevice::GetOrCreateEncryptionKey(CryConfig * config->SetEncryptionKey(new_key.ToString()); return new_key; } + + return Cipher::EncryptionKey::FromString(encryption_key); } Key CryDevice::CreateRootBlobAndReturnKey() { diff --git a/test/CryFsTest.cpp b/test/CryFsTest.cpp index ea41f0a8..d980970b 100644 --- a/test/CryFsTest.cpp +++ b/test/CryFsTest.cpp @@ -5,6 +5,8 @@ #include #include "../src/CryDevice.h" #include "../src/CryDir.h" +#include "../src/CryFile.h" +#include "../src/CryOpenFile.h" //TODO (whole project) Make constructors explicit when implicit construction not needed @@ -28,8 +30,8 @@ public: TEST_F(CryFsTest, CreatedRootdirIsLoadableAfterClosing) { { CryDevice dev(make_unique(config.path()), make_unique(rootdir.path())); - dev.Load(bf::path("/")); } CryDevice dev(make_unique(config.path()), make_unique(rootdir.path())); - dev.Load(bf::path("/")); + auto root = dev.Load(bf::path("/")); + dynamic_pointer_move(root)->children(); }