Base64.cpp File Reference


Detailed Description

Subsystem: Miscellaneous/Utility (PKIFUTILS)

Module: Miscellaneous

Id
Base64.cpp 11136 2010-01-19 16:07:59Z cwallace

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"

Include dependency graph for Base64.cpp:

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)


Function Documentation

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

Returns:
True if successful, False otherwise

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

Returns:
True if successful, False otherwise

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

Returns:
True if successful, False otherwise

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 
)


Generated on Mon Nov 15 11:16:05 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6