RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Security::Cryptography::Base64 Class Reference
Inheritance diagram for System::Security::Cryptography::Base64:
System::Security::Cryptography::CryptographyBase

Static Public Member Functions

static int encode (unsigned char *dst, size_t *dlen, const unsigned char *src, size_t slen)
 Encode a buffer into base64 format. More...
 
static int decode (OPTIONAL unsigned char *dst, size_t *dlen, const unsigned char *src, size_t slen)
 Decode a base64-formatted buffer. More...
 
static String ToBase64String (const void *lpdata, intptr_t bytes)
 Converts the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits More...
 
static ManagedMemoryBlock< unsigned char > FromBase64String (const String &base64String, OUT intptr_t *lpbytes=nullptr)
 Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array More...
 
- Static Public Member Functions inherited from System::Security::Cryptography::CryptographyBase
static void Collect (LPVOID ptr_data)
 

Member Function Documentation

int Base64::decode ( OPTIONAL unsigned char *  dst,
size_t *  dlen,
const unsigned char *  src,
size_t  slen 
)
static

Decode a base64-formatted buffer.

Parameters
dstdestination buffer (can be NULL for checking size)
dlensize of the buffer
srcsource buffer
slenamount of data to be decoded
Returns
0 if successful, or -1 BUFFER_TOO_SMALL, or -2 if the input data is not correct. *dlen is always updated to reflect the amount of data that has (or would have) been written.
Note
Call this function with *dst = NULL or *dlen = 0 to obtain the required buffer size in *dlen
int Base64::encode ( unsigned char *  dst,
size_t *  dlen,
const unsigned char *  src,
size_t  slen 
)
static

Encode a buffer into base64 format.

Parameters
dstdestination buffer
dlensize of the buffer
srcsource buffer
slenamount of data to be encoded
Returns
0 if successful, or -1 if BUFFER_TOO_SMALL. *dlen is always updated to reflect the amount of data that has (or would have) been written.
Note
Call this function with *dlen = 0 to obtain the required buffer size in *dlen
ManagedMemoryBlock< unsigned char > Base64::FromBase64String ( const String base64String,
OUT intptr_t *  lpbytes = nullptr 
)
static

Converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array

String Base64::ToBase64String ( const void *  lpdata,
intptr_t  bytes 
)
static

Converts the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits


The documentation for this class was generated from the following files: