crypto/src/main/java/org/springframework/security/crypto/password/Pbkdf2PasswordEncoder.java
public void setAlgorithm(SecretKeyFactoryAlgorithm secretKeyFactoryAlgorithm) {
		if (secretKeyFactoryAlgorithm == null) {
			throw new IllegalArgumentException("secretKeyFactoryAlgorithm cannot be null");
		}
		String algorithmName = secretKeyFactoryAlgorithm.name();
		try {
			SecretKeyFactory.getInstance(algorithmName);
		}
		catch (NoSuchAlgorithmException e) {
			throw new IllegalArgumentException("Invalid algorithm '" + algorithmName + "'.", e);
		}
		this.algorithm = algorithmName;
	}
public void setAlgorithm(SecretKeyFactoryAlgorithm secretKeyFactoryAlgorithm) {
		if (secretKeyFactoryAlgorithm == null) {
			throw new IllegalArgumentException("secretKeyFactoryAlgorithm cannot be null");
		}
		String algorithmName = secretKeyFactoryAlgorithm.name();
		try {
			SecretKeyFactory.getInstance(algorithmName);
		}
		catch (NoSuchAlgorithmException e) {
			throw new IllegalArgumentException("Invalid algorithm '" + algorithmName + "'.", e);
		}
		this.algorithm = algorithmName;
	}
Sets the algorithm to use. See
<a href="https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SecretKeyFactory">SecretKeyFactory Algorithms</a>
@param secretKeyFactoryAlgorithm the algorithm to use (i.e.
{@code SecretKeyFactoryAlgorithm.PBKDF2WithHmacSHA1},
{@code SecretKeyFactoryAlgorithm.PBKDF2WithHmacSHA256},
{@code SecretKeyFactoryAlgorithm.PBKDF2WithHmacSHA512})
@since 5.0