org.apache.synapse.securevault.keystore

## Class IdentityKeyStoreWrapper

- java.lang.Object
- - org.apache.synapse.securevault.keystore.KeyStoreWrapper
  - - org.apache.synapse.securevault.keystore.IdentityKeyStoreWrapper

-     public class IdentityKeyStoreWrapper
      extends KeyStoreWrapper

  Represents the private keyStore entry To provide that abstraction , this class exposes both getter methods to public, private and secret keys

- - ### Field Summary

    - ### Fields inherited from class org.apache.synapse.securevault.keystore.KeyStoreWrapper

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdentityKeyStoreWrapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.security.KeyStore` | `getIdentityKeyStore()` Abstraction for getting Private Entry KeyStore(Identity)
    `java.security.PrivateKey` | `getPrivateKey()` Returns the private key based on initialization data
    `java.security.PrivateKey` | `getPrivateKey(java.lang.String alias)` Returns the private key based on initialization data
    `java.security.PrivateKey` | `getPrivateKey(java.lang.String alias, java.lang.String keyPassword)` Returns the private or secret key based on given password and alias
    `void` | `init(IdentityKeyStoreInformation information, java.lang.String keyPassword)`

    - ### Methods inherited from class org.apache.synapse.securevault.keystore.KeyStoreWrapper

      `getDefaultPrivateKey, getKey, getKeyStore, getPublicKey, getPublicKey, getPublicKeyFromCertificate, getSecretKey, getSecretKey, init`

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

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

- - ### Constructor Detail

    - #### IdentityKeyStoreWrapper

          public IdentityKeyStoreWrapper()

  - ### Method Detail

    - #### init

          public void init(IdentityKeyStoreInformation information,
                           java.lang.String keyPassword)

    - #### getPrivateKey

          public java.security.PrivateKey getPrivateKey(java.lang.String alias,
                                                        java.lang.String keyPassword)

      Returns the private or secret key based on given password and alias
      Parameters:
        `alias` - The alias of the certificate in the specified keyStore
        `keyPassword` - Password to access private key
      Returns:
        PrivateKey if there is a one , otherwise null

    - #### getPrivateKey

          public java.security.PrivateKey getPrivateKey()

      Returns the private key based on initialization data
      Returns:
        PrivateKey if there is a one , otherwise null

    - #### getPrivateKey

          public java.security.PrivateKey getPrivateKey(java.lang.String alias)

      Returns the private key based on initialization data
      Overrides:
        `getPrivateKey` in class `KeyStoreWrapper`
      Parameters:
        `alias` - The alias
      Returns:
        PrivateKey if there is a one , otherwise null

    - #### getIdentityKeyStore

          public java.security.KeyStore getIdentityKeyStore()

      Abstraction for getting Private Entry KeyStore(Identity)
      Returns:
        KeyStore Instance

Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.