Class SmartCafePrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateKey, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable

    public final class SmartCafePrivateKey
    extends java.lang.Object
    implements java.security.interfaces.RSAPrivateKey
    Clave privada de una tarjeta G&D SmartCafe con Applet PKCS#15. La clase no contiene la clave privada en sí, sino una referencia a ella.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private CryptoCard card
      Instancia de la tarjeta donde reside la clave.
      private int id
      Identificador de la clave.
      private static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()  
      CryptoCard getCryptoCard()
      Obtiene la tarjeta a la que pertenece esta clave.
      byte[] getEncoded()  
      java.lang.String getFormat()  
      (package private) int getId()
      Recupera el identificador de la clave.
      java.math.BigInteger getModulus()
      Método no soportado.
      java.math.BigInteger getPrivateExponent()
      Método no soportado.
      java.lang.String toString()  
      private void writeObject​(java.io.ObjectOutputStream outStream)
      Serialización no soportada, lanza un NotSerializableException.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.security.auth.Destroyable

        destroy, isDestroyed
      • Methods inherited from interface java.security.interfaces.RSAKey

        getParams
    • Field Detail

      • id

        private final int id
        Identificador de la clave.
      • card

        private final CryptoCard card
        Instancia de la tarjeta donde reside la clave.
    • Constructor Detail

      • SmartCafePrivateKey

        SmartCafePrivateKey​(SmartCafePrivateKeyReference keyReference,
                            SmartCafePkcs15Applet cryptoCard)
        Crea una clave privada de una tarjeta G&D SmartCafe con Applet PKCS#15.
        Parameters:
        keyReference - Referencia a la clave privada.
        cryptoCard - Tarjeta sobre la que crear la clave.
    • Method Detail

      • getAlgorithm

        public java.lang.String getAlgorithm()
        Specified by:
        getAlgorithm in interface java.security.Key
      • getEncoded

        public byte[] getEncoded()
        Specified by:
        getEncoded in interface java.security.Key
      • getFormat

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key
      • getId

        int getId()
        Recupera el identificador de la clave.
        Returns:
        Identificador de la clave.
      • getModulus

        public java.math.BigInteger getModulus()
        Método no soportado.
        Specified by:
        getModulus in interface java.security.interfaces.RSAKey
      • getPrivateExponent

        public java.math.BigInteger getPrivateExponent()
        Método no soportado.
        Specified by:
        getPrivateExponent in interface java.security.interfaces.RSAPrivateKey
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream outStream)
                          throws java.io.IOException
        Serialización no soportada, lanza un NotSerializableException.
        Parameters:
        outStream - No se usa.
        Throws:
        java.io.IOException - No se lanza, siempre lanza un NotSerializableException.
      • getCryptoCard

        public CryptoCard getCryptoCard()
        Obtiene la tarjeta a la que pertenece esta clave.
        Returns:
        Tarjeta a la que pertenece esta clave.