diff --git a/model/api/src/main/java/org/keycloak/models/utils/Pbkdf2PasswordEncoder.java b/model/api/src/main/java/org/keycloak/models/utils/Pbkdf2PasswordEncoder.java index 6e95490366..066f424655 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/Pbkdf2PasswordEncoder.java +++ b/model/api/src/main/java/org/keycloak/models/utils/Pbkdf2PasswordEncoder.java @@ -90,14 +90,7 @@ public class Pbkdf2PasswordEncoder { public static byte[] getSalt() { byte[] buffer = new byte[16]; - SecureRandom secureRandom; - - try { - secureRandom = SecureRandom.getInstance(RNG_ALGORITHM); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException("RNG algorithm not found"); - } - + SecureRandom secureRandom = new SecureRandom(); secureRandom.nextBytes(buffer); return buffer;