
net.sf.mmm.crypto.asymmetric.sign.rsa.SignatureConfigRsa Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-crypto-jce Show documentation
Show all versions of mmm-crypto-jce Show documentation
Library for simple and more secure usage of cryptography (JCA and JCE).
The newest version!
package net.sf.mmm.crypto.asymmetric.sign.rsa;
import net.sf.mmm.crypto.asymmetric.key.rsa.AsymmetricKeyPairRsa;
import net.sf.mmm.crypto.asymmetric.sign.SignatureAlgorithm;
import net.sf.mmm.crypto.asymmetric.sign.SignatureConfig;
import net.sf.mmm.crypto.hash.HashConfig;
import net.sf.mmm.crypto.provider.SecurityProvider;
/**
* {@link SignatureConfig} for {@link net.sf.mmm.crypto.asymmetric.access.rsa.Rsa}.
*
* @since 1.0.0
*/
public class SignatureConfigRsa extends SignatureConfig {
/**
* The constructor.
*
* @param hashConfig the {@link HashConfig} to be used as {@link #getHashConfig() hashing config}.
* @param provider the {@link #getProvider() provider}.
*/
public SignatureConfigRsa(HashConfig hashConfig, SecurityProvider provider) {
super(SignatureFactoryRsa.get(), hashConfig, AsymmetricKeyPairRsa.ALGORITHM_RSA, provider);
}
/**
* The constructor.
*
* @param hashConfig the {@link HashConfig} to be used as {@link #getHashConfig() hashing config}.
* @param hashAlgorithm the {@link SignatureAlgorithm#getHashAlgorithm() hash algorithm}.
* @param provider the {@link #getProvider() provider}.
*/
public SignatureConfigRsa(HashConfig hashConfig, String hashAlgorithm, SecurityProvider provider) {
super(SignatureFactoryRsa.get(), hashConfig, AsymmetricKeyPairRsa.ALGORITHM_RSA, hashAlgorithm, provider);
}
@Override
public SignatureConfigRsa withoutHashConfig() {
if (getHashConfig() == null) {
return this;
}
return new SignatureConfigRsa(null, getSignatureAlgorithm().getHashAlgorithm(), getProvider());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy