You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by ch...@apache.org on 2017/09/28 15:55:32 UTC
[51/57] [abbrv] incubator-predictionio git commit: [PIO-59] Use
/dev/urandom to create access keys.
[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/livedoc
Commit: bd034f55dfc3205fd4e23805912262e11171473d
Parents: 3451836
Author: Juha Syrjälä <ju...@iki.fi>
Authored: Tue Sep 12 19:37:57 2017 -0700
Committer: Donald Szeto <do...@apache.org>
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 {