From 4ce93171ba2531268c47e09a1e9b14e848f5c436 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 13 Oct 2015 07:00:47 +0200 Subject: [PATCH] KEYCLOAK-1335 Slow startup in OpenStack --- .../org/keycloak/models/utils/Pbkdf2PasswordEncoder.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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;