10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
BCryptKey.h
1#ifndef TENDUKE_CRYPTO_WIN_CNG_BCRYPTKEY_H
2#define TENDUKE_CRYPTO_WIN_CNG_BCRYPTKEY_H
3
4#include <windows.h>
5#include <bcrypt.h>
6
7#include "utl/BinaryData.h"
8#include <memory>
9
10namespace tenduke { namespace crypto { namespace win { namespace cng {
11
12class BCryptKey
13{
14public:
15 explicit BCryptKey(const ::BCRYPT_KEY_HANDLE handle);
16
17 virtual ~BCryptKey();
18
19 static std::unique_ptr<BCryptKey> fromX509PublicKey(const utl::BinaryData &blob);
20
21 ::BCRYPT_KEY_HANDLE getHandle() const
22 {
23 return handle;
24 }
25
26private:
27 ::BCRYPT_KEY_HANDLE handle;
28};
29
30}}}}
31
32#endif //TENDUKE_CRYPTO_WIN_CNG_BCRYPTKEY_H
A holder of binary data.
Definition BinaryData.h:13
Cryptography services.
Definition CryptoException.h:7
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4