PasswordEncoderHasher
Hasher that delegates to a Spring Security passwordEncoder.
This is the base of BCryptHasher, Argon2Hasher, Pbkdf2Hasher, and SCryptHasher, and can also be used directly with any other implementation, including a DelegatingPasswordEncoder for a column whose existing values were hashed by an algorithm that is being migrated away from:
val hasher = PasswordEncoderHasher(
DelegatingPasswordEncoder(
"argon2",
mapOf("argon2" to Argon2PasswordEncoder(...), "bcrypt" to BCryptPasswordEncoder())
)
)Content copied to clipboard
To hash with something that is not a PasswordEncoder at all, implement Hasher directly.