Module: Miscellaneous
Definition in file PKIFMemoryUtils.cpp.
#include "PKIFMemoryUtils.h"
Go to the source code of this file.
Functions | |
void * | PKIFZero (void *buf, size_t len) |
Some compilers will optimize away memset under certain circumstances. | |
CAC_API void * | PKIFNew (size_t size) |
void CAC_API | PKIFDelete (void *p) |
void CAC_API PKIFDelete | ( | void * | p | ) |
Interface: External
This function deletes the poiter that was passed in
p | [in] A pointer to an object to be deleted |
Definition at line 57 of file PKIFMemoryUtils.cpp.
Referenced by PKIFAlloc< T >::deallocate(), CPKIFCAPIUserRepository2::FindCertificates(), CPKIFCAPITrustStore2::FindCertificates(), CPKIFCAPIRepository2::FindCertificates(), CPKIFCAPICredential2::SetPassword(), CPKIFNSSPasswordStorage::SetUserCallback(), CPKIFNSSDatabase::Shutdown(), CPKIFAlgorithm::~CPKIFAlgorithm(), CPKIFCAPICredential2::~CPKIFCAPICredential2(), CPKIFNSSCertUpdate::~CPKIFNSSCertUpdate(), CPKIFNSSCredential::~CPKIFNSSCredential(), CPKIFNSSCRLUpdate::~CPKIFNSSCRLUpdate(), CPKIFNSSRepository::~CPKIFNSSRepository(), and CPKIFNSSTrustStore::~CPKIFNSSTrustStore().
CAC_API void* PKIFNew | ( | size_t | size | ) |
Interface: External
This function creates an object of size specified by the parameter size and returns a pointer to that object.
size | [in] size_t is a typedef for unsigned integer |
Definition at line 44 of file PKIFMemoryUtils.cpp.
Referenced by PKIFAlloc< T >::allocate(), CPKIFSimplePasswordCallback::operator()(), and CPKIFCAPICredential2::SetPassword().
void* PKIFZero | ( | void * | buf, | |
size_t | len | |||
) |
Some compilers will optimize away memset under certain circumstances.
Interface: External
This function is used for zeroing passwords and keys. Some compilers will optimize away "memset" invocations under certain circumstances. Accordingly, this function should be used in place of calls to "memset".
buf | [in] Pointer to the buffer to be zeroized |
len | [in] Buffer byte length |
Definition at line 22 of file PKIFMemoryUtils.cpp.
Referenced by _MakeCredentialFromP8File(), CPKIFCryptoPPKAContext::SetSecret(), UnwrapSymmKey(), WrapSymmKey(), CPKIFCAPIRawCryptContext::~CPKIFCAPIRawCryptContext(), CPKIFCryptoPPCredential::~CPKIFCryptoPPCredential(), CPKIFCryptoPPKAContext::~CPKIFCryptoPPKAContext(), and CPKIFNSSCredential::~CPKIFNSSCredential().