diff options
Diffstat (limited to 'gl/lib/base64.h')
-rw-r--r-- | gl/lib/base64.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gl/lib/base64.h b/gl/lib/base64.h index ba436e02f..fa242c82d 100644 --- a/gl/lib/base64.h +++ b/gl/lib/base64.h @@ -42,12 +42,19 @@ extern void base64_encode (const char *restrict in, size_t inlen, extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out); extern void base64_decode_ctx_init (struct base64_decode_context *ctx); -extern bool base64_decode (struct base64_decode_context *ctx, - const char *restrict in, size_t inlen, - char *restrict out, size_t *outlen); -extern bool base64_decode_alloc (struct base64_decode_context *ctx, - const char *in, size_t inlen, - char **out, size_t *outlen); +extern bool base64_decode_ctx (struct base64_decode_context *ctx, + const char *restrict in, size_t inlen, + char *restrict out, size_t *outlen); + +extern bool base64_decode_alloc_ctx (struct base64_decode_context *ctx, + const char *in, size_t inlen, + char **out, size_t *outlen); + +#define base64_decode(in, inlen, out, outlen) \ + base64_decode_ctx (NULL, in, inlen, out, outlen) + +#define base64_decode_alloc(in, inlen, out, outlen) \ + base64_decode_alloc_ctx (NULL, in, inlen, out, outlen) #endif /* BASE64_H */ |