Class PK11SecureRandom

java.lang.Object
org.mozilla.jss.pkcs11.PK11SecureRandom
All Implemented Interfaces:
JSSSecureRandom

public final class PK11SecureRandom extends Object implements JSSSecureRandom
A random number generator for PKCS #11.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    /////////////////////////////////////////////////
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    nextBytes(byte[] bytes)
    Retrieves random bytes and stores them in the given array.
    void
    setSeed(byte[] seed)
    /////////////////////////////////////////////////
    void
    setSeed(long seed)
    Seed the RNG with the eight bytes contained in seed.

    Methods inherited from class Object

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

    • PK11SecureRandom

      public PK11SecureRandom()
      /////////////////////////////////////////////////
  • Method Details

    • setSeed

      public void setSeed(byte[] seed)
      /////////////////////////////////////////////////
      Specified by:
      setSeed in interface JSSSecureRandom
      Parameters:
      seed - Seed.
    • setSeed

      public void setSeed(long seed)
      Description copied from interface: JSSSecureRandom
      Seed the RNG with the eight bytes contained in seed.
      Specified by:
      setSeed in interface JSSSecureRandom
      Parameters:
      seed - Seed.
    • nextBytes

      public void nextBytes(byte[] bytes)
      Description copied from interface: JSSSecureRandom
      Retrieves random bytes and stores them in the given array.
      Specified by:
      nextBytes in interface JSSSecureRandom
      Parameters:
      bytes - Array to store random bytes.