10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
WinCNGMessageDigestFactory.h
1
#ifndef TENDUKE_CRYPTO_WIN_CNG_WINCNGMESSAGEDIGESTFACTORY_H
2
#define TENDUKE_CRYPTO_WIN_CNG_WINCNGMESSAGEDIGESTFACTORY_H
3
4
#include "crypto/MessageDigestFactory.h"
5
6
#include <mutex>
7
8
#include <windows.h>
9
#include <bcrypt.h>
10
11
namespace
tenduke
{
namespace
crypto
{
namespace
win {
namespace
cng {
12
13
class
WinCNGAlgorithms
14
{
15
16
public
:
17
WinCNGAlgorithms();
18
~WinCNGAlgorithms();
19
20
public
:
21
::BCRYPT_ALG_HANDLE get(
::tenduke::crypto::MessageDigest::Algorithm
algorithm);
22
23
private
:
24
// Very simple, we only support one alg.
25
::BCRYPT_ALG_HANDLE sha256Handle;
26
std::recursive_mutex mutex;
27
};
28
29
33
class
WinCNGMessageDigestFactory :
public
::tenduke::crypto::MessageDigestFactory
34
{
35
36
public
:
37
WinCNGMessageDigestFactory();
38
39
// ::tenduke::crypt::MessageDigestFactory implementation
40
public
:
41
std::unique_ptr<::tenduke::crypto::MessageDigest> create(
::tenduke::crypto::MessageDigest::Algorithm
algorithm)
const override
;
42
43
private
:
44
const
std::shared_ptr<WinCNGAlgorithms> algorithms;
45
};
46
47
}}}}
48
49
#endif
//TENDUKE_CRYPTO_WIN_CNG_WINCNGMESSAGEDIGESTFACTORY_H
tenduke::crypto::MessageDigestFactory
Creates instances of tenduke::crypto::MessageDigest.
Definition
MessageDigestFactory.h:12
tenduke::crypto::MessageDigest::Algorithm
Algorithm
Supported algorithms.
Definition
MessageDigest.h:24
tenduke::crypto
Cryptography services.
Definition
AbstractCiphers.h:12
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
services
windows
src
crypto
WinCNGMessageDigestFactory.h
Generated by
1.17.0