Answer the question
In order to leave comments, you need to log in
Is there a method in Java SE/EE for hashing a string using, for example, the SHA algorithm?
Is it in the standard Java SE/EE packages? What algorithms are available? If not, what do people use to solve such problems?
Answer the question
In order to leave comments, you need to log in
or via Spring Security
like BCrypt
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
//...
String password = "123456";
PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
String hashedPassword = passwordEncoder.encode(password);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question