protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, Remote.decryptPassword(password).toCharArray()); } });
public static RemoteInfo create(Remote remote) { RemoteInfo ri = new RemoteInfo(); String name = remote.getName(); ri.setName(name); String url = remote.getFetchURL(); ri.setURL(url); String userName = remote.getUserName(); ri.setUserName(userName); String password = remote.getPassword(); if (password != null) { password = Remote.decryptPassword(password); } ri.setPassword(password); ri.id = ri.hashCode(); return ri; }