b64.h File Reference

Base64 Encoding Operations. More...

#include "buffer.h"
#include <stddef.h>

Go to the source code of this file.

Functions

int b64_encode (const void *blob, size_t bloblen, buffer_t *Bb64)
 Encode a binary blob in base64.
int b64_decode (const char *b64, buffer_t *Bblob)
 Decode a base64 encoded blob.

Detailed Description

Base64 Encoding Operations.


Function Documentation

int b64_encode ( const void *  blob,
size_t  bloblen,
buffer_t Bb64 
)

Encode a binary blob in base64.

The character array pointed to by b64 must have length of at least b64_size(bloblen).

Parameters:
blob The input binary blob.
bloblen The input length of the binary blob.
b64 The output base64 encoded blob.
Returns:
0 on success, -1+errno on error.
int b64_decode ( const char *  b64,
buffer_t Bblob 
)

Decode a base64 encoded blob.

The character array pointed to by b64 must have length of at least b64_size(bloblen).

Parameters:
b64 The input base64 encoded blob.
blob The output binary blob.
bloblen The output length of the binary blob.
Returns:
0 on success, -1+errno on error.

Generated on 15 Apr 2016 for cctools by  doxygen 1.6.1