Interface IAS4CryptoFactory

All Known Subinterfaces:
IAS4PModeAwareCryptoFactory
All Known Implementing Classes:
AbstractAS4CryptoFactory, AS4CryptoFactoryConfiguration, AS4CryptoFactoryInMemoryKeyStore, AS4CryptoFactoryProperties

public interface IAS4CryptoFactory
The basic phase4 crypto interface.
Since:
0.9.7
Author:
Philip Helger
  • Method Details

    • getCrypto

      @Nonnull org.apache.wss4j.common.crypto.Crypto getCrypto(@Nonnull ECryptoMode eCryptoMode)
      Parameters:
      eCryptoMode - The crypto mode to use. Never null.
      Returns:
      A WSS4J Crypto instance and never null.
    • getKeyStore

      @Nullable KeyStore getKeyStore()
      Returns:
      The underlying key store, or null if none is available (the reasons depend on the used implementation).
    • getPrivateKeyEntry

      @Nullable KeyStore.PrivateKeyEntry getPrivateKeyEntry()
      Returns:
      The underlying private key entry from the keystore or null if none is available (the reasons depend on the used implementation).
    • getKeyAlias

      @Nullable String getKeyAlias()
      Returns:
      The keystore alias to resolve the private key entry. May be null.
    • getKeyPasswordPerAliasCharArray

      @Nullable char[] getKeyPasswordPerAliasCharArray(@Nullable String sSearchKeyAlias)
      Returns the password for the key represented by the provided alias.
      Parameters:
      sSearchKeyAlias - The alias of the key whose password is to be retrieved.
      Returns:
      The password for the key represented by the provided by the alias or null if the factory doesn't have a password for the key.
      Since:
      3.0.0
    • getKeyPasswordPerAlias

      @Nullable default String getKeyPasswordPerAlias(@Nullable String sSearchKeyAlias)
      Returns the password for the key represented by the provided alias.
      Parameters:
      sSearchKeyAlias - The alias of the key whose password is to be retrieved.
      Returns:
      The password for the key represented by the provided by the alias or null if the factory doesn't have a password for the key.
      Since:
      1.4.1
    • getTrustStore

      @Nullable KeyStore getTrustStore()
      Returns:
      The trust store to be used or null if none is configured.
      Since:
      0.12.0