mirror of https://github.com/apache/jclouds.git
JCLOUDS-1512 - Use SecureRandom in Sha512Crypt
This commit is contained in:
parent
14ba1abcfb
commit
ee880e9f42
|
@ -169,7 +169,7 @@ public class Sha512Crypt {
|
||||||
shadowPrefix = shadowPrefix.substring(0, SALT_LEN_MAX);
|
shadowPrefix = shadowPrefix.substring(0, SALT_LEN_MAX);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
java.util.Random randgen = new java.util.Random();
|
java.util.Random randgen = new java.security.SecureRandom();
|
||||||
StringBuilder saltBuf = new StringBuilder();
|
StringBuilder saltBuf = new StringBuilder();
|
||||||
|
|
||||||
while (saltBuf.length() < 16) {
|
while (saltBuf.length() < 16) {
|
||||||
|
|
Loading…
Reference in New Issue