change Base64 impl

This commit is contained in:
Looly
2022-03-18 01:16:42 +08:00
parent 7b4fd66d81
commit f52ec39d44
3 changed files with 20 additions and 24 deletions

View File

@@ -71,16 +71,6 @@ public class Base64Test {
Assert.assertEquals(a, decodeStr);
}
@Test
public void urlSafeEncodeAndDecodeTest() {
String a = "广州伦家需要安全感55";
String encode = StrUtil.utf8Str(Base64.encodeUrlSafe(StrUtil.utf8Bytes(a), false));
Assert.assertEquals("5bm_5bee5Lym5a626ZyA6KaB5a6J5YWo5oSfNTU", encode);
String decodeStr = Base64.decodeStr(encode);
Assert.assertEquals(a, decodeStr);
}
@Test
public void encodeAndDecodeGbkTest(){
String orderDescription = "订购成功立即生效30天内可观看专区中除单独计费影片外的所有内容到期自动取消。";