From 230e61091b401b8b2bb9496d557a15660fb5072b Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman <0xdec05eba@gmail.com> Date: Fri, 9 Mar 2018 10:26:55 +0100 Subject: Partially implement 'add' operation --- include/Encryption.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/Encryption.hpp') diff --git a/include/Encryption.hpp b/include/Encryption.hpp index b2afe49..4697b35 100644 --- a/include/Encryption.hpp +++ b/include/Encryption.hpp @@ -31,8 +31,7 @@ namespace odhtdb DISABLE_COPY(Encryption) public: // Throws EncryptionException on failure (or std::bad_alloc on failed memory allocation) - Encryption(const DataView &data) : Encryption(data, DataView()) {} - Encryption(const DataView &data, const DataView &additionalData); + Encryption(const DataView &data, const DataView &additionalData = DataView(), const DataView &key = DataView()); ~Encryption(); DataView getKey() const; @@ -49,8 +48,12 @@ namespace odhtdb { DISABLE_COPY(Decryption) public: + Decryption() : decryptedText(nullptr), decryptedTextLength(0) {} + // Throws DecryptionException on failure Decryption(const DataView &data, const DataView &nonce, const DataView &key); + Decryption(Decryption &&other); + Decryption& operator=(Decryption &&other); ~Decryption(); DataView getDecryptedText() const; -- cgit v1.2.3