Interface IAS4CryptoFactory

All Known Subinterfaces:
IAS4PModeAwareCryptoFactory
All Known Implementing Classes:
AbstractAS4CryptoFactory, 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.
    • getKeyPassword

      @Nullable @Deprecated(forRemoval=true, since="2.6.0") String getKeyPassword()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Don't use. Use getKeyPasswordPerAlias(String) instead.
      Returns:
      The password to access the private key entry denoted by the key alias. May be null.
    • 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