11 lines
435 B
Java
11 lines
435 B
Java
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
|
public class GenerateBcryptHash {
|
|
public static void main(String[] args) {
|
|
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(12);
|
|
String plainTextPassword = "testuser";
|
|
String bcryptHash = passwordEncoder.encode(plainTextPassword);
|
|
|
|
System.out.println("🔹 New BCrypt Hash: " + bcryptHash);
|
|
}
|
|
} |