intermediatePassword Security: Encoding, Encryption & Hashing

What is DelegatingPasswordEncoder and why is it the Spring Security default?

It's a PasswordEncoder that stores an algorithm-identifying prefix (like {bcrypt} or {argon2}) alongside every hash, and picks the right underlying encoder when verifying. This lets an application support multiple hashing algorithms simultaneously — critical for migrating from an older/weaker algorithm to a newer one without breaking existing users' ability to log in with their current hash.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to How would you migrate all users from BCrypt to Argon2 without forcing a mass password reset?← Back to all Spring Security questions