10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
Cipher.h
1#ifndef TENDUKE_CRYPTO_CIPHER_H
2#define TENDUKE_CRYPTO_CIPHER_H
3
4#include "../utl/DataSpan.h"
5#include "../utl/DataSink.h"
6
7
8namespace tenduke { namespace crypto {
9
14class Cipher
15{
16public:
17 virtual ~Cipher() = default;
18 explicit Cipher() = default;
19
20 // Ciphers are not copyable
21 Cipher(const Cipher&) = delete;
22 Cipher& operator=(const Cipher&) = delete;
23
24 // Ciphers are movable
25 Cipher(Cipher&& other) noexcept = default;
26 Cipher& operator=(Cipher&& other) noexcept = default;
27
35 virtual void decryptData(
36 const ::tenduke::utl::DataSpan& ciphertext,
38 ) const = 0;
39
50 virtual void encryptData(
51 const ::tenduke::utl::DataSpan& plaintext,
52 ::tenduke::utl::DataSink& ciphertext
53 ) const = 0;;
54};
55
56}}
57
58#endif //TENDUKE_CRYPTO_CIPHER_H
virtual void encryptData(const ::tenduke::utl::DataSpan &plaintext, ::tenduke::utl::DataSink &ciphertext) const =0
Utility method to encrypt data.
virtual void decryptData(const ::tenduke::utl::DataSpan &ciphertext, ::tenduke::utl::DataSink &plaintext) const =0
Utility method to decrypt data.
A sink to which binary data can be appended.
Definition DataSink.h:14
Cryptography services.
Definition AbstractCiphers.h:18
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4