import java.util.Base64;
public class Ba64Encrypt {
public static void main(String[] args){
String data = "123456789";
Base64.Encoder encoder = Base64.getEncoder();
byte[] bytes = encoder.encode(data.getBytes());
System.out.println("Base64加密:" + new String(bytes));
}
}
网友评论