// Login Password
        public override void addPassword(Scheme scheme, int port, String hostName, String user, String password)
        {
            Host host = new Host(ProtocolFactory.get().forScheme(scheme), hostName, port);

            host.getCredentials().setUsername(user);
            PreferencesFactory.get().setProperty(new HostUrlProvider().get(host), DataProtector.Encrypt(password));
        }
 // Generic Password
 public override void addPassword(String serviceName, String user, String password)
 {
     PreferencesFactory.get().setProperty($"{serviceName} - {user}", DataProtector.Encrypt(password));
 }
Ejemplo n.º 3
0
        // Login Password
        public override void addPassword(Scheme scheme, int port, String hostname, String user, String password)
        {
            string url = new HostUrlProvider().withPath(false).get(scheme, port, user, hostname, null);

            PreferencesFactory.get().setProperty(url, DataProtector.Encrypt(password));
        }