Package org.conscrypt

Class OpenSSLRandom

java.lang.Object
java.security.SecureRandomSpi
org.conscrypt.OpenSSLRandom
All Implemented Interfaces:
Serializable

public class OpenSSLRandom
extends SecureRandomSpi
implements Serializable
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    OpenSSLRandom()  
  • Method Summary

    Modifier and Type Method Description
    protected byte[] engineGenerateSeed​(int numBytes)
    Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by this SecureRandomSpi.
    protected void engineNextBytes​(byte[] bytes)
    Generates and stores random bytes in the given byte[] for each array element.
    protected void engineSetSeed​(byte[] seed)
    Reseeds this SecureRandomSpi instance with the specified seed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OpenSSLRandom

      public OpenSSLRandom()
  • Method Details

    • engineSetSeed

      protected void engineSetSeed​(byte[] seed)
      Description copied from class: SecureRandomSpi
      Reseeds this SecureRandomSpi instance with the specified seed. The seed of this SecureRandomSpi instance is supplemented, not replaced.
      Specified by:
      engineSetSeed in class SecureRandomSpi
      Parameters:
      seed - the new seed.
    • engineNextBytes

      protected void engineNextBytes​(byte[] bytes)
      Description copied from class: SecureRandomSpi
      Generates and stores random bytes in the given byte[] for each array element.
      Specified by:
      engineNextBytes in class SecureRandomSpi
      Parameters:
      bytes - the byte[] to be filled with random bytes.
    • engineGenerateSeed

      protected byte[] engineGenerateSeed​(int numBytes)
      Description copied from class: SecureRandomSpi
      Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by this SecureRandomSpi.
      Specified by:
      engineGenerateSeed in class SecureRandomSpi
      Parameters:
      numBytes - the number of seed bytes.
      Returns:
      the seed bytes