10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
WinCNGAESCipher.h
1
#ifndef TENDUKE_CRYPTO_WIN_CNG_AES_WINCNGAESCIPHER_H
2
#define TENDUKE_CRYPTO_WIN_CNG_AES_WINCNGAESCIPHER_H
3
4
#include "crypto/symmetric/aes/AESGCMCipher.h"
5
#include "utl/DataSink.h"
6
#include "utl/DataSpan.h"
7
8
#include <memory>
9
10
namespace
tenduke
{
namespace
crypto
{
namespace
win {
namespace
cng {
11
12
class
WinCNGAESKey
;
13
17
class
WinCNGAESCipher :
public
::tenduke::crypto::aes::AESGCMCipher
18
{
19
public
:
20
explicit
WinCNGAESCipher(
const
WinCNGAESKey
&key);
21
22
// Ciphers are not copyable
23
WinCNGAESCipher(
const
WinCNGAESCipher &) =
delete
;
24
WinCNGAESCipher &operator=(
const
WinCNGAESCipher &) =
delete
;
25
26
// Ciphers are movable
27
WinCNGAESCipher(WinCNGAESCipher &&)
noexcept
=
default
;
28
WinCNGAESCipher &operator=(WinCNGAESCipher &&)
noexcept
=
default
;
29
30
// tenduke::crypto::Cipher implementation
31
void
decryptData
(const ::tenduke::utl::DataSpan &ciphertext,
::tenduke::utl::DataSink
&plaintext)
const override
;
32
void
encryptData
(const ::tenduke::utl::DataSpan &plaintext,
::tenduke::utl::DataSink
&ciphertext)
const override
;
33
34
// tenduke::crypto::aes::AESGCMCipher implementation
35
void
encryptData
(
36
const ::tenduke::utl::DataSpan &nonce,
37
const ::tenduke::utl::DataSpan &plaintext,
38
::tenduke::utl::DataSink
&ciphertext
39
)
const override
;
40
41
private
:
42
std::unique_ptr<::tenduke::utl::DataSpan> key;
43
};
44
45
}}}}
46
47
#endif
//TENDUKE_CRYPTO_WIN_CNG_AES_WINCNGAESCIPHER_H
tenduke::crypto::aes::AESGCMCipher
An AES-GCM cipher that supports encryption with an externally provided nonce.
Definition
AESGCMCipher.h:17
tenduke::crypto::win::cng::WinCNGAESCipher::encryptData
void encryptData(const ::tenduke::utl::DataSpan &plaintext, ::tenduke::utl::DataSink &ciphertext) const override
Utility method to encrypt data.
Definition
WinCNGAESCipher.cpp:168
tenduke::crypto::win::cng::WinCNGAESCipher::decryptData
void decryptData(const ::tenduke::utl::DataSpan &ciphertext, ::tenduke::utl::DataSink &plaintext) const override
Utility method to decrypt data.
Definition
WinCNGAESCipher.cpp:178
tenduke::crypto::win::cng::WinCNGAESKey
WinCNG implementation of AES key.
Definition
WinCNGAESKey.h:15
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
services
windows
src
crypto
symmetric
aes
WinCNGAESCipher.h
Generated by
1.17.0