predictionio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chan...@apache.org
Subject [51/57] [abbrv] incubator-predictionio git commit: [PIO-59] Use /dev/urandom to create access keys.
Date Thu, 28 Sep 2017 15:55:32 GMT
[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ä <juha.syrjala@iki.fi>
Authored: Tue Sep 12 19:37:57 2017 -0700
Committer: Donald Szeto <donald@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 {


Mime
View raw message