123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- #ifndef __PJLIB_UTIL_BASE64_H__
- #define __PJLIB_UTIL_BASE64_H__
- #include <pjlib-util/types.h>
- PJ_BEGIN_DECL
- #define PJ_BASE256_TO_BASE64_LEN(len) (len * 4 / 3 + 3)
- #define PJ_BASE64_TO_BASE256_LEN(len) (len * 3 / 4)
- PJ_DECL(pj_status_t) pj_base64_encode(const pj_uint8_t *input, int in_len,
- char *output, int *out_len);
- PJ_DECL(pj_status_t) pj_base64url_encode(const pj_uint8_t *input, int in_len,
- char *output, int *out_len);
- PJ_DECL(pj_status_t) pj_base64_decode(const pj_str_t *input,
- pj_uint8_t *out, int *out_len);
- PJ_DECL(pj_status_t) pj_base64url_decode(const pj_str_t *input,
- pj_uint8_t *out, int *out_len);
- PJ_END_DECL
- #endif
|