For the latest news and information visit
The GNU Crypto project

gnu.crypto.jce.prng
Class SecureRandomAdapter

java.lang.Object
  extended byjava.security.SecureRandomSpi
      extended bygnu.crypto.jce.prng.SecureRandomAdapter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HavalRandomSpi, MD2RandomSpi, MD4RandomSpi, MD5RandomSpi, RipeMD128RandomSpi, RipeMD160RandomSpi, Sha160RandomSpi, Sha256RandomSpi, Sha384RandomSpi, Sha512RandomSpi, TigerRandomSpi, WhirlpoolRandomSpi

abstract class SecureRandomAdapter
extends java.security.SecureRandomSpi

The implementation of a generic SecureRandom adapter class to wrap gnu.crypto prng instances based on Message Digest algorithms.

This class defines the Service Provider Interface (SPI) for the SecureRandom class, which provides the functionality of a cryptographically strong pseudo-random number generator.

All the abstract methods in the SecureRandomSpi class are implemented by this class and all its sub-classes.

Version:
$Revision: 1.2 $

Constructor Summary
protected SecureRandomAdapter(java.lang.String mdName)
          Trivial protected constructor.
 
Method Summary
 byte[] engineGenerateSeed(int numBytes)
           
 void engineNextBytes(byte[] bytes)
           
 void engineSetSeed(byte[] seed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureRandomAdapter

protected SecureRandomAdapter(java.lang.String mdName)

Trivial protected constructor.

Parameters:
mdName - the canonical name of the underlying hash algorithm.
Method Detail

engineGenerateSeed

public byte[] engineGenerateSeed(int numBytes)

engineNextBytes

public void engineNextBytes(byte[] bytes)

engineSetSeed

public void engineSetSeed(byte[] seed)

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.