cencode_inc.h 723 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. cencode.h - c header for a base64 encoding algorithm
  3. This is part of the libb64 project, and has been placed in the public domain.
  4. For details, see http://sourceforge.net/projects/libb64
  5. */
  6. #ifndef BASE64_CENCODE_H
  7. #define BASE64_CENCODE_H
  8. typedef enum
  9. {
  10. step_A, step_B, step_C
  11. } base64_encodestep;
  12. typedef struct
  13. {
  14. base64_encodestep step;
  15. char result;
  16. int stepcount;
  17. } base64_encodestate;
  18. void base64_init_encodestate(base64_encodestate* state_in);
  19. char base64_encode_value(char value_in);
  20. int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in);
  21. int base64_encode_blockend(char* code_out, base64_encodestate* state_in);
  22. #endif /* BASE64_CENCODE_H */