|
Packit Service |
7770af |
/*
|
|
Packit Service |
7770af |
cencode.h - c header for a base64 encoding algorithm
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
This is part of the libb64 project, and has been placed in the public domain.
|
|
Packit Service |
7770af |
For details, see http://sourceforge.net/projects/libb64
|
|
Packit Service |
7770af |
*/
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
#ifndef BASE64_CENCODE_H
|
|
Packit Service |
7770af |
#define BASE64_CENCODE_H
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
typedef enum
|
|
Packit Service |
7770af |
{
|
|
Packit Service |
7770af |
step_A, step_B, step_C
|
|
Packit Service |
7770af |
} base64_encodestep;
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
typedef struct
|
|
Packit Service |
7770af |
{
|
|
Packit Service |
7770af |
base64_encodestep step;
|
|
Packit Service |
7770af |
char result;
|
|
Packit Service |
7770af |
int stepcount;
|
|
Packit Service |
7770af |
} base64_encodestate;
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
void base64_init_encodestate(base64_encodestate* state_in);
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
char base64_encode_value(char value_in);
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in);
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
int base64_encode_blockend(char* code_out, base64_encodestate* state_in);
|
|
Packit Service |
7770af |
|
|
Packit Service |
7770af |
#endif /* BASE64_CENCODE_H */
|
|
Packit Service |
7770af |
|