JavaScript实现的Base64编码和解码 (数字/英文/符号的编码和解码结果和java的一致)
public static String encrypt(String content) throws Exception {return new sun.misc.BASE64Encoder().encode(content.getBytes());}public static byte[] decrypt(String content) throws Exception {return new sun.misc.BASE64Decoder().decodeBuffer(content);}
?