
net.sf.mmm.crypto.hash.sha1.Sha1 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.hash.sha1;
import net.sf.mmm.crypto.hash.HashConfig;
import net.sf.mmm.crypto.provider.SecurityProvider;
/**
* {@link HashConfig} for {@code SHA1}.
* ATTENTION:
* Please note that SHA1 is a weak hash algorithm that shall not be used for secure hashing (e.g. for signing).
*
* @since 1.0.0
*/
public class Sha1 extends HashConfig {
/** The {@link #getAlgorithm() algorithm} name {@value}. */
public static final String ALGORITHM_SHA1 = "SHA1";
/** {@link Sha1} using default provider. */
public static final Sha1 SHA1 = new Sha1(null, 1);
/**
* The constructor.
*
* @param provider the {@link SecurityProvider}.
* @param iterationCount the {@link HashConfig#getIterationCount() iteration count}.
*/
public Sha1(SecurityProvider provider, int iterationCount) {
super(ALGORITHM_SHA1, provider, iterationCount);
}
/**
* @param iterationCount the {@link HashConfig#getIterationCount() iteration count}.
* @return new instance with the given {@link HashConfig#getIterationCount() iteration count}.
*/
public static Sha1 of(int iterationCount) {
return new Sha1(null, iterationCount);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy