- All Known Subinterfaces:
EncryptionAlgorithm
- All Known Implementing Classes:
AbstractAlgorithm
,AbstractDSASignature
,AbstractEncryptionAlgorithm
,AbstractRandomizableAlgorithm
,AsymmetricAlgorithm
,DigestAlgorithm
,DSASignature
,ECDSASignature
,MD2
,MD4
,MD5
,RipeMD128
,RipeMD160
,RipeMD256
,RipeMD320
,RSA
,RSASignature
,SHA1
,SHA256
,SHA384
,SHA512
,SignatureAlgorithm
,Tiger
,Whirlpool
public interface Algorithm
Describes the basic behavior of all crytographic algorithms.
- Version:
- $Revision: 2745 $
- Author:
- Middleware Services
-
Method Summary
Modifier and TypeMethodDescriptionGets 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 Details
-
getAlgorithm
String getAlgorithm()Gets the algorithm name.- Returns:
- Algorithm name.
-
setRandomProvider
Sets the source of random data for cryptographic operations needing a random data source, such as generating a random salt value.- Parameters:
random
- DatagramsDestination 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.
-