libcryfs/test/implementations/encrypted/EncryptedBlockStoreTest_Specific.cpp
Sebastian Messmer 0042ae1cef - Run test cases for EncryptedBlockStore with different ciphers
- Implement FakeAuthenticatedCipher for use with specific EncryptedBlockStoreTest
- Write skeleton for specific EncryptedBlockStoreTest
- Fix behavior of AES256_CFB when called with too small input
- Add testcase that all ciphers (also non-authenticating ones) have to handle too small input correctly
2015-05-06 00:12:14 +02:00

36 lines
1.1 KiB
C++

#include <google/gtest/gtest.h>
#include "testutils/FakeAuthenticatedCipher.h"
#include "../../../implementations/encrypted/EncryptedBlockStore.h"
#include "../../../implementations/testfake/FakeBlockStore.h"
using ::testing::Test;
using std::unique_ptr;
using std::make_unique;
using blockstore::testfake::FakeBlockStore;
using namespace blockstore::encrypted;
class EncryptedBlockStoreTest: public Test {
public:
EncryptedBlockStoreTest(): blockStore(make_unique<EncryptedBlockStore<FakeAuthenticatedCipher>>(make_unique<FakeBlockStore>(), FakeAuthenticatedCipher::Key1())) {}
unique_ptr<EncryptedBlockStore<FakeAuthenticatedCipher>> blockStore;
};
TEST_F(EncryptedBlockStoreTest, LoadingWithSameKeyWorks) {
//TODO implement
}
TEST_F(EncryptedBlockStoreTest, LoadingWithDifferentKeyDoesntWork) {
//TODO Implement
}
TEST_F(EncryptedBlockStoreTest, LoadingModifiedBlockFails) {
//TODO Implement
}
TEST_F(EncryptedBlockStoreTest, LoadingWithDifferentBlockIdFails) {
//TODO loading it with a different blockstore::Key will fail (because it stores its key in a header)
}