Package com.helger.phase4.crypto
Interface IAS4CryptoFactory
- All Known Subinterfaces:
IAS4PModeAwareCryptoFactory
- All Known Implementing Classes:
AbstractAS4CryptoFactory,AS4CryptoFactoryConfiguration,AS4CryptoFactoryInMemoryKeyStore
public interface IAS4CryptoFactory
The basic phase4 crypto interface.
- See
AS4CryptoFactoryConfigurationfor an implementation of this interface based on the global configuration
- Since:
- 0.9.7
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescription@NonNull org.apache.wss4j.common.crypto.CryptogetCrypto(@NonNull ECryptoMode eCryptoMode) @Nullable Stringdefault @Nullable StringgetKeyPasswordPerAlias(@Nullable String sSearchKeyAlias) Returns the password for the key represented by the provided alias.char @Nullable []getKeyPasswordPerAliasCharArray(@Nullable String sSearchKeyAlias) Returns the password for the key represented by the provided alias.@Nullable KeyStore@Nullable KeyStore.PrivateKeyEntry@Nullable KeyStore
-
Method Details
-
getCrypto
- Parameters:
eCryptoMode- The crypto mode to use. Nevernull.- Returns:
- A WSS4J
Cryptoinstance and nevernull.
-
getKeyStore
@Nullable KeyStore getKeyStore()- Returns:
- The underlying key store, or
nullif 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
nullif 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
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
nullif the factory doesn't have a password for the key. - Since:
- 3.0.0
-
getKeyPasswordPerAlias
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
nullif 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
nullif none is configured. - Since:
- 0.12.0
-