@Test public void testFindPassword() { final KeychainPasswordStore k = new KeychainPasswordStore(); assertNull(k.getPassword("cyberduck.ch", "u")); assertNull(k.getPassword(Scheme.http, 80, "cyberduck.ch", "u")); }
@Override public String getPassword(final Scheme scheme, final int port, final String hostname, final String user) { synchronized(lock) { return this.getInternetPasswordFromKeychain(scheme.name(), port, hostname, user); } }
KeychainPasswordStore extends DefaultHostPasswordStore implements PasswordStore { @Override public String getPassword(final Scheme scheme, final int port, final String hostname, final String user) { synchronized(lock) { return this.getInternetPasswordFromKeychain(scheme.name(), port, hostname, user); } } }
KeychainPasswordStore extends DefaultHostPasswordStore implements PasswordStore { @Override public String getPassword(final Scheme scheme, final int port, final String hostname, final String user) { synchronized(lock) { return this.getInternetPasswordFromKeychain(scheme.name(), port, hostname, user); } }  }
KeychainPasswordStore extends DefaultHostPasswordStore implements PasswordStore { @Override public String getPassword(final Scheme scheme, final int port, final String hostname, final String user) { synchronized(lock) { return this.getInternetPasswordFromKeychain(scheme.name(), port, hostname, user); } }  native String getInternetPasswordFromKeychain(String protocol, int port, String serviceName, String user); native String getPasswordFromKeychain(String serviceName, String user); native boolean addPasswordToKeychain(String serviceName, String user, String password); native boolean addInternetPasswordToKeychain(String protocol, int port, String serviceName, String user, String password); @Override String getPassword(final Scheme scheme, final int port, final String hostname, final String user); @Override void addPassword(final Scheme scheme, final int port, final String hostname, final String user, final String password); @Override String getPassword(final String serviceName, final String accountName); @Override void addPassword(final String serviceName, final String accountName, final String password); }
KeychainPasswordStore extends DefaultHostPasswordStore implements PasswordStore { @Override public String getPassword(final Scheme scheme, final int port, final String hostname, final String user) { synchronized(lock) { return this.getInternetPasswordFromKeychain(scheme.name(), port, hostname, user); } }  native String getInternetPasswordFromKeychain(String protocol, int port, String serviceName, String user); native String getPasswordFromKeychain(String serviceName, String user); native boolean addPasswordToKeychain(String serviceName, String user, String password); native boolean addInternetPasswordToKeychain(String protocol, int port, String serviceName, String user, String password); @Override String getPassword(final Scheme scheme, final int port, final String hostname, final String user); @Override void addPassword(final Scheme scheme, final int port, final String hostname, final String user, final String password); @Override String getPassword(final String serviceName, final String accountName); @Override void addPassword(final String serviceName, final String accountName, final String password);  }