edu.vt.middleware.crypt
Interface Algorithm

All Known Subinterfaces:
EncryptionAlgorithm
All Known Implementing Classes:
AbstractAlgorithm, AbstractDSASignature, AbstractEncryptionAlgorithm, AbstractRandomizableAlgorithm, AES, AsymmetricAlgorithm, Blowfish, CAST5, CAST6, DES, DESede, DigestAlgorithm, DSASignature, ECDSASignature, MD2, MD4, MD5, RC2, RC4, RC5, RC6, Rijndael, RipeMD128, RipeMD160, RipeMD256, RipeMD320, RSA, RSASignature, Serpent, SHA1, SHA256, SHA384, SHA512, SignatureAlgorithm, Skipjack, SymmetricAlgorithm, Tiger, Twofish, Whirlpool

public interface Algorithm

Describes the basic behavior of all crytographic algorithms.

Version:
$Revision: 2745 $
Author:
Middleware Services

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.
 

Method Detail

getAlgorithm

String getAlgorithm()
Gets the algorithm name.

Returns:
Algorithm name.

setRandomProvider

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.

Parameters:
random - Provider of cryptographically strong random data.

getRandomData

byte[] getRandomData(int nBytes)
Gets random bytes from the random provider of this instance in the amount specified.

Parameters:
nBytes - Number of bytes of random data to retrieve.
Returns:
Byte array of random data.


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