Package org.springframework.security.crypto.factory

## Class PasswordEncoderFactories

- java.lang.Object
- - org.springframework.security.crypto.factory.PasswordEncoderFactories

    public final class PasswordEncoderFactories
    extends java.lang.Object

Used for creating `PasswordEncoder` instances

Since:
  5.0

### Method Summary

All Methods Static Methods Concrete Methods
`static PasswordEncoder` `createDelegatingPasswordEncoder()` Creates a `DelegatingPasswordEncoder` with default mappings.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createDelegatingPasswordEncoder

    public static PasswordEncoder createDelegatingPasswordEncoder()

Creates a `DelegatingPasswordEncoder` with default mappings. Additional mappings may be added and the encoding will be updated to conform with best practices. However, due to the nature of `DelegatingPasswordEncoder` the updates should not impact users. The mappings current are:

- bcrypt - `BCryptPasswordEncoder` (Also used for encoding)
- ldap - `LdapShaPasswordEncoder`
- MD4 - `Md4PasswordEncoder`
- MD5 - `new MessageDigestPasswordEncoder("MD5")`
- noop - `NoOpPasswordEncoder`
- pbkdf2 - `Pbkdf2PasswordEncoder.defaultsForSpringSecurity_v5_5()`
- pbkdf2@SpringSecurity_v5_8 - `Pbkdf2PasswordEncoder.defaultsForSpringSecurity_v5_8()`
- scrypt - `SCryptPasswordEncoder.defaultsForSpringSecurity_v4_1()`
- scrypt@SpringSecurity_v5_8 - `SCryptPasswordEncoder.defaultsForSpringSecurity_v5_8()`
- SHA-1 - `new MessageDigestPasswordEncoder("SHA-1")`
- SHA-256 - `new MessageDigestPasswordEncoder("SHA-256")`
- sha256 - `StandardPasswordEncoder`
- argon2 - `Argon2PasswordEncoder.defaultsForSpringSecurity_v5_2()`
- argon2@SpringSecurity_v5_8 - `Argon2PasswordEncoder.defaultsForSpringSecurity_v5_8()`

Returns:
  the `PasswordEncoder` to use