org.mozilla.jss.pkcs11

Class PK11SecureRandom

Implemented Interfaces:
JSSSecureRandom

public final class PK11SecureRandom
extends java.lang.Object
implements JSSSecureRandom

A random number generator for PKCS #11.
See Also:
CryptoManager

Constructor Summary

PK11SecureRandom()

Method Summary

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

Constructor Details

PK11SecureRandom

public PK11SecureRandom()

Method Details

nextBytes

public void nextBytes(bytes[] )
Retrieves random bytes and stores them in the given array.
Specified by:
nextBytes in interface JSSSecureRandom

setSeed

public void setSeed(byte[] seed)
Seed the RNG with the given seed bytes.
Specified by:
setSeed in interface JSSSecureRandom

setSeed

public void setSeed(long seed)
Seed the RNG with the eight bytes contained in seed.
Specified by:
setSeed in interface JSSSecureRandom