1#ifndef TENDUKE_CRYPT_WIN_CNG_NCRYPTHANDLE_H
2#define TENDUKE_CRYPT_WIN_CNG_NCRYPTHANDLE_H
5#include "../WinCNG_utils.h"
9namespace tenduke {
namespace crypto {
namespace win {
namespace cng {
15 explicit NCryptHandle(
const H handle)
20 virtual ~NCryptHandle()
23 auto status = ::NCryptFreeObject(handle);
25 if (status != ERROR_SUCCESS) {
27 std::string(
"NCryptFreeObject failed. Ignored. Error code: ")
28 + std::to_string(status)
30 + ::tenduke::crypto::win::cng::getNCryptErrorMessage(status)
36 virtual H getHandle()
const
Cryptography services.
Definition CryptoException.h:7
void warning(const char *message)
Write message to global logger at WARNING-level.
Definition log.cpp:94
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4