Module io.github.mmm.crypto
Class SignatureConfig<S extends SignatureBinary>
- java.lang.Object
-
- io.github.mmm.crypto.CryptoConfig
-
- io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
-
- io.github.mmm.crypto.asymmetric.sign.SignatureConfig<S>
-
- Type Parameters:
S- type ofSignatureBinary.
- All Implemented Interfaces:
CryptoAlgorithm
- Direct Known Subclasses:
SignatureConfigEcDsa,SignatureConfigRsa
public class SignatureConfig<S extends SignatureBinary> extends CryptoAlgorithmConfig
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
algorithm
-
Fields inherited from class io.github.mmm.crypto.CryptoConfig
provider
-
-
Constructor Summary
Constructors Constructor Description SignatureConfig(SignatureFactory<S> signatureFactory, HashConfig hashConfig, String signingAlgorithm, SecurityProvider provider)The constructor.SignatureConfig(SignatureFactory<S> signatureFactory, HashConfig hashConfig, String signingAlgorithm, String hashAlgorithm, SecurityProvider provider)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HashConfiggetHashConfig()SignatureAlgorithmgetSignatureAlgorithm()SignatureFactory<S>getSignatureFactory()SignatureConfig<S>withoutHashConfig()-
Methods inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmConfig
getAlgorithm
-
Methods inherited from class io.github.mmm.crypto.CryptoConfig
getProvider
-
-
-
-
Constructor Detail
-
SignatureConfig
public SignatureConfig(SignatureFactory<S> signatureFactory, HashConfig hashConfig, String signingAlgorithm, String hashAlgorithm, SecurityProvider provider)
The constructor.- Parameters:
signatureFactory- thesignature factory.hashConfig- theHashConfigused to calculate the hash that is the signed.signingAlgorithm- thesigning algorithm.hashAlgorithm- thehash algorithmused by the signing algorithm (e.g. for HMac).provider- theprovider.
-
SignatureConfig
public SignatureConfig(SignatureFactory<S> signatureFactory, HashConfig hashConfig, String signingAlgorithm, SecurityProvider provider)
The constructor.- Parameters:
signatureFactory- thesignature factory.hashConfig- theHashConfigused to calculate the hash that is the signed.signingAlgorithm- thesigning algorithm.provider- theprovider.
-
-
Method Detail
-
getSignatureAlgorithm
public SignatureAlgorithm getSignatureAlgorithm()
- Returns:
- the structured
SignatureAlgorithm.
-
getHashConfig
public HashConfig getHashConfig()
- Returns:
- the optional
HashConfigused for hashing. If notnullthe data to sign will be first hashed using this configuration and the resulting hash will then be signed usingsignature algorithm.
-
getSignatureFactory
public SignatureFactory<S> getSignatureFactory()
- Returns:
- the
SignatureFactory.
-
withoutHashConfig
public SignatureConfig<S> withoutHashConfig()
- Returns:
- a copy of this
SignatureConfigwithouthash config(set tonull).
-
-