@Override public char[] reqPassword(Resource<?> resource) { char[] cloned = password.clone(); blankOut(password); return cloned; }
/** * Authenticate {@code username} using the {@code "password"} authentication method and as a fallback basic * challenge-response authentication.. The {@code password} array is blanked out after use. * * @param username user to authenticate * @param password the password to use for authentication * * @throws UserAuthException in case of authentication failure * @throws TransportException if there was a transport-layer error */ public void authPassword(final String username, final char[] password) throws UserAuthException, TransportException { try { authPassword(username, new PasswordFinder() { @Override public char[] reqPassword(Resource<?> resource) { return password.clone(); } @Override public boolean shouldRetry(Resource<?> resource) { return false; } }); } finally { PasswordUtils.blankOut(password); } }
this.verify(new String(passphrase)); } finally { PasswordUtils.blankOut(passphrase);
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase))); } finally { PasswordUtils.blankOut(passphrase);
@Override public char[] reqPassword(Resource<?> resource) { char[] cloned = password.clone(); blankOut(password); return cloned; }
@Override public char[] reqPassword(Resource<?> resource) { char[] cloned = password.clone(); blankOut(password); return cloned; }
/** * Authenticate {@code username} using the {@code "password"} authentication method and as a fallback basic * challenge-response authentication.. The {@code password} array is blanked out after use. * * @param username user to authenticate * @param password the password to use for authentication * * @throws UserAuthException in case of authentication failure * @throws TransportException if there was a transport-layer error */ public void authPassword(final String username, final char[] password) throws UserAuthException, TransportException { try { authPassword(username, new PasswordFinder() { @Override public char[] reqPassword(Resource<?> resource) { return password.clone(); } @Override public boolean shouldRetry(Resource<?> resource) { return false; } }); } finally { PasswordUtils.blankOut(password); } }
/** * Authenticate {@code username} using the {@code "password"} authentication method and as a fallback basic * challenge-response authentication.. The {@code password} array is blanked out after use. * * @param username user to authenticate * @param password the password to use for authentication * * @throws UserAuthException in case of authentication failure * @throws TransportException if there was a transport-layer error */ public void authPassword(final String username, final char[] password) throws UserAuthException, TransportException { try { authPassword(username, new PasswordFinder() { @Override public char[] reqPassword(Resource<?> resource) { return password.clone(); } @Override public boolean shouldRetry(Resource<?> resource) { return false; } }); } finally { PasswordUtils.blankOut(password); } }
this.verify(new String(passphrase)); } finally { PasswordUtils.blankOut(passphrase);
PasswordUtils.blankOut(passphrase);
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase))); } finally { PasswordUtils.blankOut(passphrase);
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase))); } finally { PasswordUtils.blankOut(passphrase);