All Downloads are FREE. Search and download functionalities are using the official Maven repository.

es.gob.jmulticard.jse.provider.DniePasswordCallback Maven / Gradle / Ivy

There is a newer version: 1.8
Show newest version
package es.gob.jmulticard.jse.provider;

import java.security.KeyStore.PasswordProtection;

import javax.security.auth.callback.PasswordCallback;

final class DniePasswordCallback extends PasswordCallback {

	private static final long serialVersionUID = -2511696590746468782L;

	private final PasswordProtection passp;

	/** Constructor.
	 * @param pp PasswordProtection para solicitar la contraseña. */
	DniePasswordCallback(final PasswordProtection pp) {
		super("Por favor, introduzca el PIN del DNIe", false); //$NON-NLS-1$
		if (pp == null) {
			throw new IllegalArgumentException(
				"El PasswordProtection no puede ser nulo" //$NON-NLS-1$
			);
		}
		this.passp = pp;
	}

	@Override
	public char[] getPassword() {
		return this.passp.getPassword();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy