Module: Miscellaneous
Definition in file Base64.cpp.
#include <string>
#include <cstring>
#include "Base64Buffer.h"
#include "PKIFBase64.h"
#include "PKIFException.h"
#include "components.h"
#include "PKIFCommonErrors.h"
#include "boost/numeric/conversion/cast.hpp"
Go to the source code of this file.
Functions | |
bool CAC_API | B64Decode (const char *encoded, unsigned char **decoded, unsigned long *decodedLen) |
bool CAC_API | PEMDecode (const char *encoded, unsigned char **decoded, unsigned long *decodedLen) |
bool CAC_API | PEMDecode_l (const char *encoded, unsigned long sourceLen, unsigned char **decoded, unsigned long *decodedLen) |
bool CAC_API | B64Encode (const unsigned char *plain, unsigned long plainLen, char **encoded) |
bool CAC_API B64Decode | ( | const char * | encoded, | |
unsigned char ** | decoded, | |||
unsigned long * | decodedLen | |||
) |
Interface: External
This functions decodes encoded into a newly allocated buffer and points decoded at it. call delte[] to free the result
Definition at line 31 of file Base64.cpp.
References COMMON_INVALID_INPUT, CBase64Buffer::decode(), and TOOLKIT_UTILS.
Referenced by LoadPathProcessingComponents(), LoadRevocationStatusComponents(), CPKIFPathSettingsSerializer::LoadSettings(), LoadStorageAndRetrievalComponents(), and PEMDecode_l().
bool CAC_API B64Encode | ( | const unsigned char * | plain, | |
unsigned long | plainLen, | |||
char ** | encoded | |||
) |
Interface: External
This function encodes plain into a newly allocated buffer and points encoded at it call delte[] to free the result
Definition at line 143 of file Base64.cpp.
References CBase64Buffer::encode().
Referenced by SavePathProcessingComponents(), SaveRevocationStatusComponents(), SaveSettings_wx(), SaveStorageAndRetrievalComponents(), and PKIFXSECCryptoX509::SetCertificate().
bool CAC_API PEMDecode | ( | const char * | encoded, | |
unsigned char ** | decoded, | |||
unsigned long * | decodedLen | |||
) |
Interface: External
This functions decodes encoded after removing PEM lines into a newly allocated buffer and points decoded at it. call delte[] to free the result
Definition at line 65 of file Base64.cpp.
References PEMDecode_l().
Referenced by CPKIFSignedData::Decode(), CPKIFEnvelopedData::Decode(), CPKIFEncryptedData::Decode(), CPKIFContentCollection::Decode(), and CPKIFContentInfo::Decode().
bool CAC_API PEMDecode_l | ( | const char * | encoded, | |
unsigned long | sourceLen, | |||
unsigned char ** | decoded, | |||
unsigned long * | decodedLen | |||
) |
Definition at line 76 of file Base64.cpp.
References B64Decode().
Referenced by _MakeCredentialFromP8File(), CPKIFCRL::Decode(), CPKIFCertificate::Decode(), MakeCredentialFromP8File(), and PEMDecode().