Class SHA1PRNGHybrid

java.lang.Object
java.security.SecureRandomSpi
com.ibm.crypto.ibmjcehybrid.provider.SHA1PRNGHybrid
All Implemented Interfaces:
Serializable

public final class SHA1PRNGHybrid extends SecureRandomSpi
This class is a facade for the SHA1 Pseudo Random Number Generation algorithm.
See Also:
  • Constructor Details

    • SHA1PRNGHybrid

      public SHA1PRNGHybrid()
      Creates an instance of the SHA1PRNGHybrid class.
    • SHA1PRNGHybrid

      public SHA1PRNGHybrid(byte[] seed)
      Creates an instance of the SHA1PRNGHybrid class.
      Parameters:
      seed - a series of bytes used as seed
  • Method Details

    • engineSetSeed

      public void engineSetSeed(byte[] seed) throws UnsupportedOperationException
      Sets the seed value for the random number generator.
      Specified by:
      engineSetSeed in class SecureRandomSpi
      Parameters:
      seed - a series of bytes used as seed.
      Throws:
      UnsupportedOperationException - is never thrown by this method.
    • engineNextBytes

      public void engineNextBytes(byte[] bytes)
      Generates a user-specified number of random bytes.
      Specified by:
      engineNextBytes in class SecureRandomSpi
      Parameters:
      bytes - the array to be filled in with random bytes.
    • engineGenerateSeed

      public byte[] engineGenerateSeed(int numBytes)
      This method generates a seed value that the app could pass back on a setSeed() call, or could pass to a different SecureRandom object on a setSeed() call.
      Specified by:
      engineGenerateSeed in class SecureRandomSpi
      Parameters:
      numBytes - the size of the seed to generate
    • getGenerator

      protected void getGenerator(byte[] seed)
      Creates an instance of the SecureRandom.
      Throws:
      RuntimeException - if this method fails to create and to initialize the SecureRandom.
    • getBestInstance

      public SecureRandom getBestInstance(byte[] seed)
      Creates an instance of the specified KeyGenerator, the provider will be the selecting the first provider in the list for the generator that returns a KeyGenerator object.
      Parameters:
      seed - a series of bytes used as seed value.
      Returns:
      the requested Secure Random object
      Throws:
      RuntimeException - if this constructor fails to authenticate the JCE framework.