base64.h 734 B

1234567891011121314151617181920212223
  1. #ifndef _BASE64_H_
  2. #define _BASE64_H_
  3. /**
  4. * @brief: base64 encode
  5. * @aug: bindata--unsigned char *,[input aug], need encod buffer
  6. * binlength--int, [input aug], the length of need encod buffer
  7. * base64--const char *, [input aug], after encoded content
  8. * @return: point to the decoded buffer
  9. */
  10. char * base64_encode( unsigned char * bindata, char * base64, int binlength );
  11. /**
  12. * @brief: base64 decode
  13. * @aug: base64--const char *, [input aug], need decode content
  14. * bindata--unsigned char *,[input aug], after decoded buffer
  15. * @return: the length of the decoded buffer
  16. */
  17. int base64_decode( char * base64, unsigned char * boutdata );
  18. int get_base64_size(int size);
  19. #endif // BASE64_H