akka.remote.security.provider
Class AES128CounterSecureRNG

java.lang.Object
  extended by java.security.SecureRandomSpi
      extended by akka.remote.security.provider.AES128CounterSecureRNG
All Implemented Interfaces:
java.io.Serializable

public class AES128CounterSecureRNG
extends java.security.SecureRandomSpi

Internal API This class is a wrapper around the 128-bit AESCounterRNG algorithm provided by http://maths.uncommons.org/ The only method used by netty ssl is engineNextBytes(bytes) This RNG is good to use to prevent startup delay when you don't have Internet access to random.org

See Also:
Serialized Form

Constructor Summary
AES128CounterSecureRNG()
           
 
Method Summary
protected  byte[] engineGenerateSeed(int numBytes)
          Unused method Returns the given number of seed bytes.
protected  void engineNextBytes(byte[] bytes)
          Generates a user-specified number of random bytes.
protected  void engineSetSeed(byte[] seed)
          This is managed internally by AESCounterRNG
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AES128CounterSecureRNG

public AES128CounterSecureRNG()
Method Detail

engineSetSeed

protected void engineSetSeed(byte[] seed)
This is managed internally by AESCounterRNG

Specified by:
engineSetSeed in class java.security.SecureRandomSpi

engineNextBytes

protected void engineNextBytes(byte[] bytes)
Generates a user-specified number of random bytes.

Specified by:
engineNextBytes in class java.security.SecureRandomSpi
Parameters:
bytes - the array to be filled in with random bytes.

engineGenerateSeed

protected byte[] engineGenerateSeed(int numBytes)
Unused method Returns the given number of seed bytes. This call may be used to seed other random number generators.

Specified by:
engineGenerateSeed in class java.security.SecureRandomSpi
Parameters:
numBytes - the number of seed bytes to generate.
Returns:
the seed bytes.