Base64 functions.
More...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Base64 functions.
This header is intended for use by any library or application, not only libcmime.
| void cmime_base64_decode_block |
( |
unsigned char |
in[4], |
|
|
unsigned char |
out[3] |
|
) |
| |
Decode 4 byte base64 block.
- Parameters
-
| in | 4byte input |
| out | 3byte output |
| void cmime_base64_decode_file |
( |
FILE * |
infile, |
|
|
FILE * |
outfile |
|
) |
| |
Decode complete file from base64 and write to file pointer.
- Parameters
-
| infile | input file pointer |
| outfile | output file pointer |
| char* cmime_base64_decode_string |
( |
const char * |
source | ) |
|
Decode base64 string.
- Parameters
-
| source | base64 string to decode |
- Returns
- newly allocated chart pointer with decoded string
| void cmime_base64_encode_block |
( |
unsigned char |
in[3], |
|
|
unsigned char |
out[4], |
|
|
int |
len |
|
) |
| |
Encode 3byte block to base64.
- Parameters
-
| in | 3byte input |
| out | 4byte output |
| len | number of charactes in input |
| void cmime_base64_encode_file |
( |
FILE * |
infile, |
|
|
FILE * |
outfile, |
|
|
int |
linelen |
|
) |
| |
Encode complete file to base64 and write to file pointer.
- Parameters
-
| infile | input file pointer |
| outfile | output file pointer |
| linelen | maximum line length used when writing base64 to file |
| char* cmime_base64_encode_string |
( |
const char * |
source | ) |
|
Encode string to base64.
- Parameters
-
- Returns
- newly allocated char pointer with encoded string