package test;
import org.apache.axiom.om.util.Base64;
public class Test
{
public static void main(String[] args)
{
String str = Base64.encode("test".getBytes());
System.out.println("加密后:"+str);
System.out.println("解密后:"+new String(Base64.decode("dGVzdA==")));
}
}
本文提供了一个使用Java实现Base64编码与解码的简单示例。通过具体的代码展示如何对字符串进行Base64编码及解码操作。
3万+

被折叠的 条评论
为什么被折叠?



