#include <PKIFBCryptGuard.h>
CPKIFBCryptGuard cngGuard; if(cngGuard.IsCNGAvailable()) { ... do CNG things ... } else { ... do CAPI things ... }
Definition at line 33 of file PKIFBCryptGuard.h.
Public Member Functions | |
CPKIFBCryptGuard () | |
~CPKIFBCryptGuard () | |
bool | IsCNGAvailable () |
const char * | GetLoaderError () |
Static Public Member Functions | |
static void | Shutdown () |
CPKIFBCryptGuard::CPKIFBCryptGuard | ( | ) |
Interface: External
Default constructor. all actual work is handled by the impl, which is a singleton
Definition at line 98 of file PKIFBCryptGuard.cpp.
CPKIFBCryptGuard::~CPKIFBCryptGuard | ( | ) |
Interface: External
Default destructor.
Definition at line 111 of file PKIFBCryptGuard.cpp.
bool CPKIFBCryptGuard::IsCNGAvailable | ( | ) |
Interface: External
Test whether CNG can be loaded and used.
Definition at line 140 of file PKIFBCryptGuard.cpp.
References CPKIFBCryptGuardImpl::IsCNGAvailable().
Referenced by LoadCryptoComponents(), MakeDefaultKeyIDColleague(), MakeDefaultMediator(), MakeDefaultRawColleague(), and SaveCryptoComponents().
const char * CPKIFBCryptGuard::GetLoaderError | ( | ) |
Interface: External
Return any error message that's around from the last attempt to load CNG
Definition at line 155 of file PKIFBCryptGuard.cpp.
References CPKIFBCryptGuardImpl::GetLastError().
void CPKIFBCryptGuard::Shutdown | ( | ) | [static] |
Interface: External
Called to clean up the singleton impl. This should really never be called by a user of the library under normal circumstances; BCryptGuardCleanerInstance will take care of it when PKIF is unloaded
Definition at line 125 of file PKIFBCryptGuard.cpp.
Referenced by BCryptGuardCleaner::~BCryptGuardCleaner().