Uses of Class
java.security.SecureRandom
Package
Description
Provides the classes and interfaces for the security framework.
Provides interfaces for generating RSA (Rivest, Shamir and
Adleman AsymmetricCipher algorithm)
keys as defined in the RSA Laboratory Technical Note
PKCS#1, and DSA (Digital Signature
Algorithm) keys as defined in NIST's FIPS-186.
Provides the classes and interfaces for cryptographic
operations.
Provides classes for the secure socket package.
-
Uses of SecureRandom in java.security
Modifier and TypeFieldDescriptionprotected SecureRandom
SignatureSpi.appRandom
Application-specified source of randomness.Modifier and TypeMethodDescriptionstatic SecureRandom
SecureRandom.getInstance
(String algorithm) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.static SecureRandom
SecureRandom.getInstance
(String algorithm, String provider) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.static SecureRandom
SecureRandom.getInstance
(String algorithm, Provider provider) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.static SecureRandom
SecureRandom.getInstance
(String algorithm, SecureRandomParameters params) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParameters
request.static SecureRandom
SecureRandom.getInstance
(String algorithm, SecureRandomParameters params, String provider) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParameters
request.static SecureRandom
SecureRandom.getInstance
(String algorithm, SecureRandomParameters params, Provider provider) Returns aSecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParameters
request.static SecureRandom
SecureRandom.getInstanceStrong()
Returns aSecureRandom
object that was selected by using the algorithms/providers specified in thesecurerandom.strongAlgorithms
Security
property.Modifier and TypeMethodDescriptionprotected abstract void
AlgorithmParameterGeneratorSpi.engineInit
(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.protected abstract void
AlgorithmParameterGeneratorSpi.engineInit
(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.protected void
SignatureSpi.engineInitSign
(PrivateKey privateKey, SecureRandom random) Initializes thisSignature
object with the specified private key and source of randomness for signing operations.final void
AlgorithmParameterGenerator.init
(int size, SecureRandom random) Initializes this parameter generator for a certain size and source of randomness.final void
AlgorithmParameterGenerator.init
(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values.void
KeyPairGenerator.initialize
(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).void
KeyPairGenerator.initialize
(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator with the given parameter set and source of randomness.abstract void
KeyPairGeneratorSpi.initialize
(int keysize, SecureRandom random) Initializes the key pair generator for a certain keysize, using the default parameter set.void
KeyPairGeneratorSpi.initialize
(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.final void
Signature.initSign
(PrivateKey privateKey, SecureRandom random) Initialize this object for signing. -
Uses of SecureRandom in java.security.interfaces
Modifier and TypeMethodDescriptionvoid
DSAKeyPairGenerator.initialize
(int modlen, boolean genParams, SecureRandom random) Initializes the key pair generator for a given modulus length (instead of parameters), and an optional SecureRandom bit source.void
DSAKeyPairGenerator.initialize
(DSAParams params, SecureRandom random) Initializes the key pair generator using the DSA family parameters (p,q and g) and an optional SecureRandom bit source. -
Uses of SecureRandom in javax.crypto
Modifier and TypeMethodDescriptionprotected abstract void
CipherSpi.engineInit
(int opmode, Key key, AlgorithmParameters params, SecureRandom random) Initializes thisCipherSpi
object with a key, a set of algorithm parameters, and a source of randomness.protected abstract void
CipherSpi.engineInit
(int opmode, Key key, SecureRandom random) Initializes thisCipherSpi
object with a key and a source of randomness.protected abstract void
CipherSpi.engineInit
(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) Initializes thisCipherSpi
object with a key, a set of algorithm parameters, and a source of randomness.protected abstract void
KeyAgreementSpi.engineInit
(Key key, SecureRandom random) Initializes this key agreement with the given key and source of randomness.protected abstract void
KeyAgreementSpi.engineInit
(Key key, AlgorithmParameterSpec params, SecureRandom random) Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.protected abstract void
KeyGeneratorSpi.engineInit
(int keysize, SecureRandom random) Initializes this key generator for a certain keysize, using the given source of randomness.protected abstract void
KeyGeneratorSpi.engineInit
(SecureRandom random) Initializes the key generator.protected abstract void
KeyGeneratorSpi.engineInit
(AlgorithmParameterSpec params, SecureRandom random) Initializes the key generator with the specified parameter set and a user-provided source of randomness.final void
Cipher.init
(int opmode, Certificate certificate, SecureRandom random) Initializes thisCipher
object with the public key from the given certificate and a source of randomness.final void
Cipher.init
(int opmode, Key key, AlgorithmParameters params, SecureRandom random) Initializes thisCipher
object with a key, a set of algorithm parameters, and a source of randomness.final void
Cipher.init
(int opmode, Key key, SecureRandom random) Initializes thisCipher
object with a key and a source of randomness.final void
Cipher.init
(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) Initializes thisCipher
object with a key, a set of algorithm parameters, and a source of randomness.final void
KeyAgreement.init
(Key key, SecureRandom random) Initializes this key agreement with the given key and source of randomness.final void
KeyAgreement.init
(Key key, AlgorithmParameterSpec params, SecureRandom random) Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.final void
KeyGenerator.init
(int keysize, SecureRandom random) Initializes this key generator for a certain keysize, using a user-provided source of randomness.final void
KeyGenerator.init
(SecureRandom random) Initializes this key generator.final void
KeyGenerator.init
(AlgorithmParameterSpec params, SecureRandom random) Initializes this key generator with the specified parameter set and a user-provided source of randomness. -
Uses of SecureRandom in javax.net.ssl
Modifier and TypeMethodDescriptionprotected abstract void
SSLContextSpi.engineInit
(KeyManager[] km, TrustManager[] tm, SecureRandom sr) Initializes this context.final void
SSLContext.init
(KeyManager[] km, TrustManager[] tm, SecureRandom random) Initializes this context.