Repository: incubator-predictionio Updated Branches: refs/heads/develop 345183658 -> bd034f55d
[PIO-59] Use /dev/urandom to create access keys. Creating access keys based on /dev/random may take a long time on virtualized or clound environment for example more than 10 minutes. Closes #367 Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/bd034f55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/bd034f55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/bd034f55 Branch: refs/heads/develop Commit: bd034f55dfc3205fd4e23805912262e11171473d Parents: 3451836 Author: Juha Syrjälä <[email protected]> Authored: Tue Sep 12 19:37:57 2017 -0700 Committer: Donald Szeto <[email protected]> Committed: Tue Sep 12 19:39:18 2017 -0700 ---------------------------------------------------------------------- .../scala/org/apache/predictionio/data/storage/AccessKeys.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/bd034f55/data/src/main/scala/org/apache/predictionio/data/storage/AccessKeys.scala ---------------------------------------------------------------------- diff --git a/data/src/main/scala/org/apache/predictionio/data/storage/AccessKeys.scala b/data/src/main/scala/org/apache/predictionio/data/storage/AccessKeys.scala index b96bd82..ca1c8b3 100644 --- a/data/src/main/scala/org/apache/predictionio/data/storage/AccessKeys.scala +++ b/data/src/main/scala/org/apache/predictionio/data/storage/AccessKeys.scala @@ -66,7 +66,7 @@ trait AccessKeys { /** Default implementation of key generation */ def generateKey: String = { - val sr = SecureRandom.getInstanceStrong + val sr = new SecureRandom val srBytes = Array.fill(48)(0.toByte) sr.nextBytes(srBytes) Base64.encodeBase64URLSafeString(srBytes) match {
