
按我的理解
atob => ascii to base64 => input ascii output base64
btoa => base64 to ascii => input base64 output ascii
1 koebehshian 2017-12-22 16:54:20 +08:00 https://stackoverflow.com/questions/33854103/why-were-Javascript-atob-and-btoa-named-like-that b 是 binary,a 是 ascii,因为 base 的字符串表示是用 ascii 编码的。 atob() Decodes a string of data which has been encoded using base-64 encoding. btoa() Creates a base-64 encoded ASCII string from a "string" of binary data. |
2 DevilBin 2017-12-23 08:12:19 +08:00 via Android 我也是这么想的 |