BASE64Encoder 的使用

public static void main(String[] args) throws IOException {


BASE64Encoder encoder = new BASE64Encoder();

System.out.println("Please input user name:");

String username= new BufferedReader(new InputStreamReader(System.in)).readLine();

System.out.println(encoder.encode(username.getBytes()));

System.out.println("please input password:");

String password=new BufferedReader(new InputStreamReader(System.in)).readLine();

System.out.println(encoder.encode(password.getBytes()));

}

需要添加BASE64Encoder.jar包

你可能感兴趣的:(BASE64Encoder)