//加密
String encodeToString = Base64.getEncoder().encodeToString(password.getBytes());
System.out.println(encodeToString);
//解码
byte[] decode = Base64.getDecoder().decode(encodeToString);
System.out.println(new String(decode));
//加密
String encodeToString = Base64.getEncoder().encodeToString(password.getBytes());
System.out.println(encodeToString);
//解码
byte[] decode = Base64.getDecoder().decode(encodeToString);
System.out.println(new String(decode));
本文标题:java自带的Base64
本文链接:https://www.haomeiwen.com/subject/diehqhtx.html
网友评论