I want to use password encryption before it will be saved in mySQL. For this school project,
i am using Spring boot mvc together with hibernate. What is the best and simplest way to do it?
I am new to Java, spring boot, hibernate.
Any help will be appriciated.
Spring, Hibernate, PBE ... for a school project? That sounds interesting.
Unfortunately I don't know much about Spring or Hibernate - but from what I read over the years they seem to have all you need - and I'm sure some smart brains here can tell you how to do it.
I think you mean "password hashing", not "password encryption". You would only encrypt a password if you need to unencrypt it later to access some external system, which happens very rarely and even then is questionably practice. To authenticate a user, you hash a password instead.
You can use Spring Security to do user authentication and you can configure it to use a database for your users and you can also configure a hashing algorithm for passwords.
It's difficult to explain how to do it exactly without knowing how much you know about Spring.
Do you know what dependency injection is? Do you know what request filtering is? Do you know how filter chains work?
Everybody's invited. Except this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!