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

es.gob.jmulticard.jse.provider.ceres.CeresPasswordCallback Maven / Gradle / Ivy

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

import java.security.KeyStore.PasswordProtection;

import javax.security.auth.callback.PasswordCallback;

/** PasswordCallback para tarjetas FNMT-CERES.
 * @author Sergio Martínez Rico. */
final class CeresPasswordCallback extends PasswordCallback {

	private static final long serialVersionUID = -2511696590746468782L;

	private final PasswordProtection passp;

	/** Callback para solicitar la constraseña.
	 * @param pp PasswordProtection para solicitar la constraseña. */
	CeresPasswordCallback(final PasswordProtection pp) {
		super("Por favor, introduzca el PIN de la tarjeta CERES", 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