GmSSL icon indicating copy to clipboard operation
GmSSL copied to clipboard

js包里提供的base64加密方法有误

Open zhaopeng1234 opened this issue 3 years ago • 0 comments

Describe the bug js包里提供的base64加密方法有误,末尾补全会多加几个字符

Expected behavior var testsbyte = [0x61]; var base641 = base64_encode(testsbyte); console.log(base641); 理论输出值:YQ== 实际输出值:YQAA== Environments chrome 97.0.4692.99

Additional context 建议使用js原生的 btoa(String.fromCharCode.apply(String,dgst))方法进行base64编码

zhaopeng1234 avatar Jan 26 '22 07:01 zhaopeng1234