aboutsummaryrefslogtreecommitdiff
path: root/include/Encryption.hpp
diff options
context:
space:
mode:
authorAleksi Lindeman <0xdec05eba@gmail.com>2018-03-09 10:26:55 +0100
committerAleksi Lindeman <0xdec05eba@gmail.com>2018-03-09 10:27:06 +0100
commit230e61091b401b8b2bb9496d557a15660fb5072b (patch)
tree13b937d93105c069d6478480c8a9ada45ccc2434 /include/Encryption.hpp
parent2ffb47d0043e57707474e5ae811f97c2e5e93f25 (diff)
Partially implement 'add' operation
Diffstat (limited to 'include/Encryption.hpp')
-rw-r--r--include/Encryption.hpp7
1 files changed, 5 insertions, 2 deletions
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;