Somehow the code for the fast and the secure was flipped

This commit is contained in:
Viktor Klang 2012-06-20 01:56:15 +02:00
parent dbe72a6bf3
commit 95419ba82f
3 changed files with 7 additions and 12 deletions

View file

@ -3,14 +3,14 @@
*/
package akka.security.provider
import org.uncommons.maths.random.{ AESCounterRNG, SecureRandomSeedGenerator }
import org.uncommons.maths.random.{ AESCounterRNG, DefaultSeedGenerator }
import java.security.SecureRandom
/**
* Internal API
*/
class AES128CounterRNGFast extends java.security.SecureRandomSpi {
private val rng = new AESCounterRNG(new SecureRandomSeedGenerator())
private val rng = new AESCounterRNG()
/**
* This is managed internally only
@ -31,6 +31,6 @@ class AES128CounterRNGFast extends java.security.SecureRandomSpi {
* @param numBytes the number of seed bytes to generate.
* @return the seed bytes.
*/
override protected def engineGenerateSeed(numBytes: Int): Array[Byte] = (new SecureRandom).generateSeed(numBytes)
override protected def engineGenerateSeed(numBytes: Int): Array[Byte] = DefaultSeedGenerator.getInstance.generateSeed(numBytes)
}

View file

@ -3,13 +3,13 @@
*/
package akka.security.provider
import org.uncommons.maths.random.{ AESCounterRNG, DefaultSeedGenerator }
import org.uncommons.maths.random.{ AESCounterRNG, SecureRandomSeedGenerator }
/**
* Internal API
*/
class AES128CounterRNGSecure extends java.security.SecureRandomSpi {
private val rng = new AESCounterRNG()
private val rng = new AESCounterRNG(new SecureRandomSeedGenerator())
/**
* This is managed internally only
@ -30,6 +30,6 @@ class AES128CounterRNGSecure extends java.security.SecureRandomSpi {
* @param numBytes the number of seed bytes to generate.
* @return the seed bytes.
*/
override protected def engineGenerateSeed(numBytes: Int): Array[Byte] = DefaultSeedGenerator.getInstance.generateSeed(numBytes)
override protected def engineGenerateSeed(numBytes: Int): Array[Byte] = (new SecureRandomSeedGenerator()).generateSeed(numBytes)
}

View file

@ -15,12 +15,7 @@ akka {
actor.provider = "akka.remote.RemoteActorRefProvider"
remote.netty {
hostname = localhost
port = 12345
}
actor.deployment {
/blub.remote = "akka://remote-sys@localhost:12346"
/looker/child.remote = "akka://remote-sys@localhost:12346"
/looker/child/grandchild.remote = "akka://RemoteCommunicationSpec@localhost:12345"
port = 0
}
}
""") with ImplicitSender with DefaultTimeout {