ARTEMIS-786 Using RandomUtil instead of SecureRandom..
This was introducing several performance hits. I was running the examples and they were not completing at all on my environment.
This commit is contained in:
parent
e89f6a1bfd
commit
5965a45894
|
@ -22,7 +22,6 @@ import javax.crypto.spec.PBEKeySpec;
|
|||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.math.BigInteger;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -189,10 +188,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec<String> {
|
|||
}
|
||||
|
||||
public byte[] getSalt() throws NoSuchAlgorithmException {
|
||||
byte[] salt = new byte[this.saltLength];
|
||||
|
||||
SecureRandom sr = SecureRandom.getInstance(this.randomScheme);
|
||||
sr.nextBytes(salt);
|
||||
byte[] salt = RandomUtil.randomBytes(this.saltLength);
|
||||
return salt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue