|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.AbstractAlgorithm
public abstract class AbstractAlgorithm
Abstract cryptographic algorithm that is the basis of digest, encryption, and signature algorithms.
| Field Summary | |
|---|---|
protected String |
algorithm
Algorithm name. |
protected org.slf4j.Logger |
logger
Logger instance. |
protected int |
randomByteSize
Number of bytes used for random data needs. |
protected SecureRandom |
randomProvider
Provider of secure random data. |
| Constructor Summary | |
|---|---|
AbstractAlgorithm()
|
|
| Method Summary | |
|---|---|
String |
getAlgorithm()
Gets the algorithm name. |
byte[] |
getRandomData(int nBytes)
Gets random bytes from the random provider of this instance in the amount specified. |
void |
setRandomProvider(SecureRandom random)
Sets the source of random data for cryptographic operations needing a random data source, such as generating a random salt value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
protected String algorithm
protected SecureRandom randomProvider
protected int randomByteSize
| Constructor Detail |
|---|
public AbstractAlgorithm()
| Method Detail |
|---|
public String getAlgorithm()
getAlgorithm in interface Algorithmpublic void setRandomProvider(SecureRandom random)
setRandomProvider in interface Algorithmrandom - Provider of cryptographically strong random data.public String toString()
toString in class Objectpublic byte[] getRandomData(int nBytes)
getRandomData in interface AlgorithmnBytes - Number of bytes of random data to retrieve.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||