diff options
Diffstat (limited to 'src/manager/crypto/generic-backend/gstore.h')
-rw-r--r-- | src/manager/crypto/generic-backend/gstore.h | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/src/manager/crypto/generic-backend/gstore.h b/src/manager/crypto/generic-backend/gstore.h index 5ada1665..d66d9eae 100644 --- a/src/manager/crypto/generic-backend/gstore.h +++ b/src/manager/crypto/generic-backend/gstore.h @@ -33,58 +33,61 @@ namespace Crypto { // Data is very generic and does not say anything about content. struct Data { - Data() {}; - Data(const DataType& t, RawBuffer d) : type(t), data(std::move(d)) {} - DataType type; - RawBuffer data; // buffer will be better? + Data() {}; + Data(const DataType &t, RawBuffer d) : type(t), data(std::move(d)) {} + DataType type; + RawBuffer data; // buffer will be better? }; // Too generic. The name does not say anything aobut content. struct DataEncryption { - DataEncryption() {}; - DataEncryption(RawBuffer encKey, RawBuffer ivector) - : encryptedKey(std::move(encKey)) - , iv(std::move(ivector)) - {} - RawBuffer encryptedKey; - RawBuffer iv; + DataEncryption() {} + DataEncryption(RawBuffer encKey, RawBuffer ivector) + : encryptedKey(std::move(encKey)) + , iv(std::move(ivector)) + { + } + RawBuffer encryptedKey; + RawBuffer iv; }; class GStore { public: - virtual GObjUPtr getObject(const Token &, const Password &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual TokenPair generateAKey(const CryptoAlgorithm &, const Password &, const Password &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual Token generateSKey(const CryptoAlgorithm &, const Password &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual Token import(const Data &, const Password &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual Token importEncrypted(const Data &, const Password &, const DataEncryption &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual void destroy(const Token &) - { - ThrowErr(Exc::Crypto::OperationNotSupported); - } - virtual ~GStore() {} + virtual GObjUPtr getObject(const Token &, const Password &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual TokenPair generateAKey(const CryptoAlgorithm &, const Password &, + const Password &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual Token generateSKey(const CryptoAlgorithm &, const Password &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual Token import(const Data &, const Password &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual Token importEncrypted(const Data &, const Password &, + const DataEncryption &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual void destroy(const Token &) + { + ThrowErr(Exc::Crypto::OperationNotSupported); + } + virtual ~GStore() {} protected: - explicit GStore(CryptoBackend backendId) : - m_backendId(backendId) - { - } + explicit GStore(CryptoBackend backendId) : + m_backendId(backendId) + { + } - CryptoBackend m_backendId; + CryptoBackend m_backendId; }; } // namespace Crypto |