|
10Duke Enterprise C++ SDK
|
#include <BCryptAlgorithm.h>
RAII wrapper for BCRYPT_ALG_HANDLE.
Manages the lifecycle of a BCrypt algorithm provider handle. Automatically opens the algorithm provider on construction and closes it on destruction. Move-only type: supports move semantics but prevents copying to avoid double-release.
Public Member Functions | |
| BCryptAlgorithm (LPCWSTR algorithmName, ULONG flags=0) | |
| Opens a BCrypt algorithm provider. | |
| BCryptAlgorithm (BCryptAlgorithm &&other) noexcept | |
| Move constructor. | |
| ~BCryptAlgorithm () | |
| Closes the algorithm provider handle. | |
| BCryptAlgorithm & | operator= (BCryptAlgorithm &&other) noexcept |
| Move assignment operator. | |
| BCRYPT_ALG_HANDLE | get () const |
| Gets the underlying BCRYPT_ALG_HANDLE. | |
|
explicit |
Opens a BCrypt algorithm provider.
| algorithmName | the name of the algorithm (e.g., BCRYPT_AES_ALGORITHM) |
| flags | optional flags for BCryptOpenAlgorithmProvider (e.g., BCRYPT_ALG_HANDLE_HMAC_FLAG) |
| CryptoException | if the algorithm provider cannot be opened |
|
noexcept |
Move constructor.
Transfers ownership of the handle.
| BCRYPT_ALG_HANDLE tenduke::crypto::win::cng::BCryptAlgorithm::get | ( | ) | const |
Gets the underlying BCRYPT_ALG_HANDLE.
|
noexcept |
Move assignment operator.
Transfers ownership of the handle.