Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit e7a7079

Browse files
author
Shuxin Yang
committed
add no_padding option to ngx_http_lua_ffi_encode_base64
1 parent bbc64d4 commit e7a7079

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ngx_http_lua_string.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,8 @@ ngx_http_lua_ffi_sha1_bin(const u_char *src, size_t len, u_char *dst)
700700

701701

702702
size_t
703-
ngx_http_lua_ffi_encode_base64(const u_char *src, size_t slen, u_char *dst)
703+
ngx_http_lua_ffi_encode_base64(const u_char *src, size_t slen, u_char *dst,
704+
int no_padding)
704705
{
705706
ngx_str_t in, out;
706707

@@ -709,7 +710,7 @@ ngx_http_lua_ffi_encode_base64(const u_char *src, size_t slen, u_char *dst)
709710

710711
out.data = dst;
711712

712-
ngx_encode_base64(&out, &in);
713+
ngx_http_lua_encode_base64(&out, &in, no_padding);
713714

714715
return out.len;
715716
}

0 commit comments

Comments
 (0)