edu.vt.middleware.crypt
Class AbstractRandomizableAlgorithm

java.lang.Object
  extended by edu.vt.middleware.crypt.AbstractAlgorithm
      extended by edu.vt.middleware.crypt.AbstractRandomizableAlgorithm
All Implemented Interfaces:
Algorithm, Randomizable
Direct Known Subclasses:
DigestAlgorithm

public abstract class AbstractRandomizableAlgorithm
extends AbstractAlgorithm
implements Randomizable

Abstract base class for all algorithms that can be initialized with an arbitrary amount of random data.

Version:
$Revision: 3 $
Author:
Middleware Services

Field Summary
protected  int randomByteSize
          Number of bytes used for random data needs.
 
Fields inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
algorithm, logger, randomProvider
 
Constructor Summary
AbstractRandomizableAlgorithm()
           
 
Method Summary
 int getRandomByteSize()
          Gets the number of random bytes used for calculations that need random data.
 void setRandomByteSize(int size)
          Sets the number of random bytes used for calculations that need random data.
 
Methods inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
getAlgorithm, getRandomData, setRandomProvider, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

randomByteSize

protected int randomByteSize
Number of bytes used for random data needs.

Constructor Detail

AbstractRandomizableAlgorithm

public AbstractRandomizableAlgorithm()
Method Detail

getRandomByteSize

public int getRandomByteSize()
Gets the number of random bytes used for calculations that need random data.

Specified by:
getRandomByteSize in interface Randomizable
Returns:
Number of bytes of random data.

setRandomByteSize

public void setRandomByteSize(int size)
Sets the number of random bytes used for calculations that need random data.

Specified by:
setRandomByteSize in interface Randomizable
Parameters:
size - Number of bytes to obtain from random provider.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.