Mercurial > hg > nginx-quic
diff src/core/ngx_string.h @ 409:8ac40cae79f0
nginx-0.0.10-2004-08-29-07:55:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 29 Aug 2004 03:55:41 +0000 |
parents | d6e2b445c1b8 |
children | da8c5707af39 |
line wrap: on
line diff
--- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -71,8 +71,12 @@ ngx_int_t ngx_hextoi(u_char *line, size_ void ngx_md5_text(u_char *text, u_char *md5); -ngx_int_t ngx_encode_base64(ngx_pool_t *pool, ngx_str_t *src, ngx_str_t *dst); -ngx_int_t ngx_decode_base64(ngx_pool_t *pool, ngx_str_t *src, ngx_str_t *dst); + +#define ngx_base64_encoded_length(len) (((len + 2) / 3) * 4) +#define ngx_base64_decoded_length(len) (((len + 3) / 4) * 3) + +void ngx_encode_base64(ngx_str_t *src, ngx_str_t *dst); +ngx_int_t ngx_decode_base64(ngx_str_t *src, ngx_str_t *dst); #define ngx_qsort qsort