10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
Ciphers.h
1
#ifndef TENDUKE_CRYPTO_CIPHERS_H
2
#define TENDUKE_CRYPTO_CIPHERS_H
3
4
#include "./Cipher.h"
5
#include "../utl/BinaryData.h"
6
#include "../utl/DataSpan.h"
7
#include "../utl/DataSink.h"
8
#include <memory>
9
#include <string>
10
11
namespace
tenduke
{
namespace
crypto
{
12
30
class
Ciphers
31
{
32
public
:
33
virtual
~Ciphers
() =
default
;
34
45
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
decrypt
(
46
const ::tenduke::utl::DataSpan &ciphertext,
47
const ::tenduke::utl::DataSpan &encryptionKey
48
)
const
= 0;
49
60
virtual
std::string
decryptString
(
61
const ::tenduke::utl::DataSpan &ciphertext,
62
const ::tenduke::utl::DataSpan &encryptionKey
63
)
const
= 0;
64
73
virtual
std::string
decryptString
(
74
const ::tenduke::crypto::Cipher &cipher,
75
const ::tenduke::utl::DataSpan &ciphertext
76
)
const
= 0;
77
86
virtual
void
encrypt
(
87
const ::tenduke::crypto::Cipher &cipher,
88
const ::tenduke::utl::DataSpan &plaintext,
89
::tenduke::utl::DataSink
&ciphertext
90
)
const
= 0;
91
102
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
encrypt
(
103
const ::tenduke::utl::DataSpan &plaintext,
104
const ::tenduke::utl::DataSpan &encryptionKey
105
)
const
= 0;
106
117
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
encrypt
(
118
const
std::string &plaintext,
119
const ::tenduke::utl::DataSpan &encryptionKey
120
)
const
= 0;
121
};
122
123
}}
124
125
#endif
//TENDUKE_CRYPTO_CIPHERS_H
tenduke::crypto::Ciphers
A "service locator" for cipher-related operations.
Definition
Ciphers.h:31
tenduke::crypto::Ciphers::decrypt
virtual std::unique_ptr<::tenduke::utl::BinaryData > decrypt(const ::tenduke::utl::DataSpan &ciphertext, const ::tenduke::utl::DataSpan &encryptionKey) const =0
Decrypts given data using the system default cipher (AES256 GCM).
tenduke::crypto::Ciphers::decryptString
virtual std::string decryptString(const ::tenduke::utl::DataSpan &ciphertext, const ::tenduke::utl::DataSpan &encryptionKey) const =0
Decrypts given data using the system default cipher (AES256 GCM) to a string.
tenduke::crypto::Ciphers::encrypt
virtual void encrypt(const ::tenduke::crypto::Cipher &cipher, const ::tenduke::utl::DataSpan &plaintext, ::tenduke::utl::DataSink &ciphertext) const =0
Encrypts data with the given cipher.
tenduke::crypto::Ciphers::decryptString
virtual std::string decryptString(const ::tenduke::crypto::Cipher &cipher, const ::tenduke::utl::DataSpan &ciphertext) const =0
Decrypts given data using the given cipher to a string.
tenduke::crypto::Ciphers::encrypt
virtual std::unique_ptr<::tenduke::utl::BinaryData > encrypt(const ::tenduke::utl::DataSpan &plaintext, const ::tenduke::utl::DataSpan &encryptionKey) const =0
Encrypts given data using the system default cipher (AES256 GCM).
tenduke::crypto::Ciphers::encrypt
virtual std::unique_ptr<::tenduke::utl::BinaryData > encrypt(const std::string &plaintext, const ::tenduke::utl::DataSpan &encryptionKey) const =0
Encrypts given data using the system default cipher (AES256 GCM).
tenduke::utl::DataSink
A sink to which binary data can be appended.
Definition
DataSink.h:14
tenduke::crypto
Cryptography services.
Definition
AbstractCiphers.h:18
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
core
src
crypto
Ciphers.h
Generated by
1.17.0