akka.remote.security.provider
Class AES256CounterSecureRNG

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

public class AES256CounterSecureRNG
extends java.security.SecureRandomSpi

INTERNAL API This class is a wrapper around the 256-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
AES256CounterSecureRNG()
           
 
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

AES256CounterSecureRNG

public AES256CounterSecureRNG()
Method Detail

engineSetSeed

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

Specified by:
engineSetSeed in class java.security.SecureRandomSpi
Parameters:
seed - (undocumented)

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.