### Base64编码说明
Base64编码要求把3个8位字节(3*8=24)转化为4个6位的字节(4*6=24),之后在6位的前面补两个0,形成8位一个字节的形式。 如果剩下的字符不足3个字节,则用0填充,输出字符使用'=',因此编码后输出的文本末尾可能会出现1或2个'='。
为了保证所输出的编码位可读字符,Base64制定了一个编码表,以便进行统一转换。编码表的大小为2^6=64,这也是Base64名称的由来。
### Base64编码表
<table class="mtable " style="border-collapse:collapse; border-spacing:0px; font-size:12px; border-top-width:1px; border-top-style:solid; border-top-color:rgb(198,222,240); border-left-width:1px; border-left-style:solid; border-left-color:rgb(198,222,240); margin:5px 0px; color:rgb(0,0,0); font-family:tahoma,helvetica,arial,'5b8b4f53',sans-serif; line-height:18px; text-align:center"><tbody><tr><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">码值</span></th><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">字符</span></th><td rowspan="18" style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif"><br/></span></td><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">码值</span></th><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">字符</span></th><td rowspan="18" style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif"><br/></span></td><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">码值</span></th><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">字符</span></th><td rowspan="18" style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif"><br/></span></td><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">码值</span></th><th scope="col" style="margin:0px; padding:2px 4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240); background-color:rgb(237,247,255)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">字符</span></th></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">0</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">A</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">16</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">Q</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">32</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">g</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">48</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">w</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">1</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">B</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">17</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">R</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">33</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">h</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">49</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">x</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">2</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">C</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">18</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">S</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">34</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">i</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">50</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">y</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">3</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">D</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">19</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">T</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">35</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">j</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">51</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">z</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">4</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">E</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">20</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">U</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">36</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">k</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">52</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">0</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">5</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">F</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">21</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">V</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">37</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">l</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">53</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">1</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">6</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">G</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">22</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">W</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">38</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">m</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">54</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">2</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">7</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">H</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">23</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">X</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">39</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">n</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">55</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">3</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">8</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">I</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">24</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">Y</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">40</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">o</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">56</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">4</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">9</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">J</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">25</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">Z</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">41</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">p</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">57</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">5</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">10</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">K</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">26</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">a</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">42</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">q</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">58</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">6</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">11</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">L</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">27</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">b</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">43</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">r</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">59</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">7</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">12</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">M</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">28</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">c</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">44</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">s</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">60</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">8</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">13</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">N</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">29</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">d</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">45</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">t</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">61</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">9</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">14</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">O</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">30</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">e</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">46</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">u</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">62</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">+</span></td></tr><tr><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">15</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">P</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">31</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">f</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">47</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">v</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">63</span></td><td style="margin:0px; padding:4px; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:rgb(198,222,240); border-right-width:1px; border-right-style:solid; border-right-color:rgb(198,222,240)"><span style="font-family:tahoma,helvetica,arial,5b8b4f53,sans-serif">/<br/><br/></span></td></tr></tbody></table>
**用法:**
~~~
String token = "hello world"; // 编码前
String base64Token = Base64.encodeToString(token.getBytes(), Base64.DEFAULT);// 编码后
byte[] m = Base64.decode(base64Token,Base64.DEFAULT);// 解码后
~~~
其中第二个参数:
Base64.flag
-
CRLF 这个参数看起来比较眼熟,它就是Win风格的换行符,意思就是使用CR LF这一对作为一行的结尾而不是Unix风格的LF
-
DEFAULT 这个参数是默认,使用默认的方法来加密
-
NO_PADDING 这个参数是略去加密字符串最后的”=”
-
NO_WRAP 这个参数意思是略去所有的换行符(设置后CRLF就没用了)
-
URL_SAFE 这个参数意思是加密时不使用对URL和文件名有特殊意义的字符来作为加密字符,具体就是以-和_取代+和/