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 "../utl/BinaryData.h"
5
#include "../utl/DataSpan.h"
6
#include <memory>
7
#include <string>
8
9
namespace
tenduke
{
namespace
crypto
{
10
17
class
Ciphers
18
{
19
public
:
20
virtual
~Ciphers
() =
default
;
21
32
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
decrypt
(
33
const ::tenduke::utl::DataSpan &ciphertext,
34
const ::tenduke::utl::DataSpan &encryptionKey
35
)
const
= 0;
36
47
virtual
std::string
decryptString
(
48
const ::tenduke::utl::DataSpan &ciphertext,
49
const ::tenduke::utl::DataSpan &encryptionKey
50
)
const
= 0;
51
62
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
encrypt
(
63
const ::tenduke::utl::DataSpan &plaintext,
64
const ::tenduke::utl::DataSpan &encryptionKey
65
)
const
= 0;
66
77
virtual
std::unique_ptr<::tenduke::utl::BinaryData>
encrypt
(
78
const
std::string &plaintext,
79
const ::tenduke::utl::DataSpan &encryptionKey
80
)
const
= 0;
81
};
82
83
}}
84
85
#endif
//TENDUKE_CRYPTO_CIPHERS_H
tenduke::crypto::Ciphers
A "service locator" for cipher-related operations.
Definition
Ciphers.h:18
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 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::crypto
Cryptography services.
Definition
AbstractCiphers.h:12
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