es.gob.jmulticard.jse.provider

## Class MrtdKeyStoreImpl

- java.lang.Object
- - java.security.KeyStoreSpi
  - - es.gob.jmulticard.jse.provider.MrtdKeyStoreImpl

-     public final class MrtdKeyStoreImpl
      extends java.security.KeyStoreSpi

  JCA SPI implementation for DNIe.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MrtdKeyStoreImpl(java.lang.String CAN, android.nfc.Tag NFCTag)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsLabels(java.lang.String alias)`
    `java.util.Enumeration<java.lang.String>` | `engineAliases()`
    `boolean` | `engineContainsAlias(java.lang.String alias)`
    `void` | `engineDeleteEntry(java.lang.String alias)` Operation not supported.
    `boolean` | `engineEntryInstanceOf(java.lang.String alias, java.lang.Class<? extends java.security.KeyStore.Entry> entryClass)`
    `java.security.cert.Certificate` | `engineGetCertificate(java.lang.String alias)`
    `java.lang.String` | `engineGetCertificateAlias(java.security.cert.Certificate cert)`
    `java.security.cert.Certificate[]` | `engineGetCertificateChain(java.lang.String alias)`
    `java.util.Date` | `engineGetCreationDate(java.lang.String alias)` Operation not supported.
    `java.security.KeyStore.Entry` | `engineGetEntry(java.lang.String alias, java.security.KeyStore.ProtectionParameter protParam)`
    `java.security.Key` | `engineGetKey(java.lang.String alias, char[] password)`
    `boolean` | `engineIsCertificateEntry(java.lang.String alias)`
    `boolean` | `engineIsKeyEntry(java.lang.String alias)`
    `void` | `engineLoad(java.io.InputStream stream, char[] password)`
    `void` | `engineLoad(java.security.KeyStore.LoadStoreParameter param)`
    `void` | `engineSetCertificateEntry(java.lang.String alias, java.security.cert.Certificate cert)` Operation not supported.
    `void` | `engineSetKeyEntry(java.lang.String alias, byte[] key, java.security.cert.Certificate[] chain)` Operation not supported.
    `void` | `engineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] pass, java.security.cert.Certificate[] chain)` Operation not supported.
    `int` | `engineSize()`
    `void` | `engineStore(java.io.OutputStream os, char[] pass)` Operation not supported.
    `es.gob.jmulticard.apdu.connection.ApduConnection` | `getConnection()`
    `DG1_Dnie` | `getDataGroup1()`
    `DG11` | `getDataGroup11()`
    `DG13` | `getDataGroup13()`
    `DG2` | `getDataGroup2()`
    `DG7` | `getDataGroup7()`
    `byte[]` | `getDataObject(java.lang.String label)`
    `EF_COM` | `getEFCOM()`
    `boolean` | `verifyAge(java.util.Date birthDate)`

    - ### Methods inherited from class java.security.KeyStoreSpi

      `engineSetEntry, engineStore`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MrtdKeyStoreImpl

          public MrtdKeyStoreImpl(java.lang.String CAN,
                                  android.nfc.Tag NFCTag)

      Constructor.
      Parameters:
        `CAN` - 6 digit number required for secure connection establishment.
        `NFCTag` - Tag object retrieved by the Android system when device is detected.

  - ### Method Detail

    - #### containsLabels

          public boolean containsLabels(java.lang.String alias)

    - #### engineAliases

          public java.util.Enumeration<java.lang.String> engineAliases()

      Specified by:
        `engineAliases` in class `java.security.KeyStoreSpi`

    - #### engineContainsAlias

          public boolean engineContainsAlias(java.lang.String alias)

      Specified by:
        `engineContainsAlias` in class `java.security.KeyStoreSpi`

    - #### engineDeleteEntry

          public void engineDeleteEntry(java.lang.String alias)
                                 throws java.security.KeyStoreException

      Operation not supported.
      Specified by:
        `engineDeleteEntry` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.KeyStoreException`

    - #### engineEntryInstanceOf

          public boolean engineEntryInstanceOf(java.lang.String alias,
                                               java.lang.Class<? extends java.security.KeyStore.Entry> entryClass)

      Overrides:
        `engineEntryInstanceOf` in class `java.security.KeyStoreSpi`

    - #### engineGetCertificate

          public java.security.cert.Certificate engineGetCertificate(java.lang.String alias)

      Specified by:
        `engineGetCertificate` in class `java.security.KeyStoreSpi`

    - #### engineGetCertificateAlias

          public java.lang.String engineGetCertificateAlias(java.security.cert.Certificate cert)

      Specified by:
        `engineGetCertificateAlias` in class `java.security.KeyStoreSpi`

    - #### engineGetCertificateChain

          public java.security.cert.Certificate[] engineGetCertificateChain(java.lang.String alias)

      Specified by:
        `engineGetCertificateChain` in class `java.security.KeyStoreSpi`

    - #### engineGetCreationDate

          public java.util.Date engineGetCreationDate(java.lang.String alias)

      Operation not supported.
      Specified by:
        `engineGetCreationDate` in class `java.security.KeyStoreSpi`

    - #### engineGetEntry

          public java.security.KeyStore.Entry engineGetEntry(java.lang.String alias,
                                                             java.security.KeyStore.ProtectionParameter protParam)
                                                      throws java.security.KeyStoreException,
                                                             java.security.NoSuchAlgorithmException,
                                                             java.security.UnrecoverableEntryException

      Overrides:
        `engineGetEntry` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.KeyStoreException`
        `java.security.NoSuchAlgorithmException`
        `java.security.UnrecoverableEntryException`

    - #### engineGetKey

          public java.security.Key engineGetKey(java.lang.String alias,
                                                char[] password)
                                         throws java.security.NoSuchAlgorithmException,
                                                java.security.UnrecoverableKeyException

      Specified by:
        `engineGetKey` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.NoSuchAlgorithmException`
        `java.security.UnrecoverableKeyException`

    - #### engineIsCertificateEntry

          public boolean engineIsCertificateEntry(java.lang.String alias)

      Specified by:
        `engineIsCertificateEntry` in class `java.security.KeyStoreSpi`

    - #### engineIsKeyEntry

          public boolean engineIsKeyEntry(java.lang.String alias)

      Specified by:
        `engineIsKeyEntry` in class `java.security.KeyStoreSpi`

    - #### engineLoad

          public void engineLoad(java.io.InputStream stream,
                                 char[] password)
                          throws java.io.IOException,
                                 java.security.NoSuchAlgorithmException,
                                 java.security.cert.CertificateException

      Specified by:
        `engineLoad` in class `java.security.KeyStoreSpi`
      Throws:
        `java.io.IOException`
        `java.security.NoSuchAlgorithmException`
        `java.security.cert.CertificateException`

    - #### engineLoad

          public void engineLoad(java.security.KeyStore.LoadStoreParameter param)
                          throws java.io.IOException,
                                 java.security.NoSuchAlgorithmException,
                                 java.security.cert.CertificateException

      Overrides:
        `engineLoad` in class `java.security.KeyStoreSpi`
      Throws:
        `java.io.IOException`
        `java.security.NoSuchAlgorithmException`
        `java.security.cert.CertificateException`

    - #### engineSetCertificateEntry

          public void engineSetCertificateEntry(java.lang.String alias,
                                                java.security.cert.Certificate cert)
                                         throws java.security.KeyStoreException

      Operation not supported.
      Specified by:
        `engineSetCertificateEntry` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.KeyStoreException`

    - #### engineSetKeyEntry

          public void engineSetKeyEntry(java.lang.String alias,
                                        byte[] key,
                                        java.security.cert.Certificate[] chain)
                                 throws java.security.KeyStoreException

      Operation not supported.
      Specified by:
        `engineSetKeyEntry` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.KeyStoreException`

    - #### engineSetKeyEntry

          public void engineSetKeyEntry(java.lang.String alias,
                                        java.security.Key key,
                                        char[] pass,
                                        java.security.cert.Certificate[] chain)
                                 throws java.security.KeyStoreException

      Operation not supported.
      Specified by:
        `engineSetKeyEntry` in class `java.security.KeyStoreSpi`
      Throws:
        `java.security.KeyStoreException`

    - #### engineSize

          public int engineSize()

      Specified by:
        `engineSize` in class `java.security.KeyStoreSpi`

    - #### engineStore

          public void engineStore(java.io.OutputStream os,
                                  char[] pass)
                           throws java.io.IOException,
                                  java.security.NoSuchAlgorithmException,
                                  java.security.cert.CertificateException

      Operation not supported.
      Specified by:
        `engineStore` in class `java.security.KeyStoreSpi`
      Throws:
        `java.io.IOException`
        `java.security.NoSuchAlgorithmException`
        `java.security.cert.CertificateException`

    - #### getConnection

          public es.gob.jmulticard.apdu.connection.ApduConnection getConnection()

    - #### getDataGroup1

          public final DG1_Dnie getDataGroup1()

    - #### getDataGroup11

          public final DG11 getDataGroup11()

    - #### getDataGroup13

          public final DG13 getDataGroup13()

    - #### getDataGroup2

          public final DG2 getDataGroup2()

    - #### getDataGroup7

          public final DG7 getDataGroup7()

    - #### getDataObject

          public byte[] getDataObject(java.lang.String label)

    - #### getEFCOM

          public final EF_COM getEFCOM()

    - #### verifyAge

          public final boolean verifyAge(java.util.Date birthDate)