Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SecureRandomSpi

public abstract class SecureRandomSpi
extends Object implements Serializable

java.lang.Object
   ↳ java.security.SecureRandomSpi


SecureRandomSpi is the Service Provider Interface (SPI) definition for SecureRandom.

See also:

Summary

Public constructors

SecureRandomSpi()

Protected methods

abstract byte[] engineGenerateSeed(int numBytes)

Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by this SecureRandomSpi.

abstract void engineNextBytes(byte[] bytes)

Generates and stores random bytes in the given byte[] for each array element.

abstract void engineSetSeed(byte[] seed)

Reseeds this SecureRandomSpi instance with the specified seed.

Inherited methods

From class java.lang.Object

Public constructors

SecureRandomSpi

Added in API level 1
SecureRandomSpi ()

Protected methods

engineGenerateSeed

Added in API level 1
byte[] engineGenerateSeed (int numBytes)

Generates and returns the specified number of seed bytes, computed using the seed generation algorithm used by this SecureRandomSpi.

Parameters
numBytes int: the number of seed bytes.
Returns
byte[] the seed bytes

engineNextBytes

Added in API level 1
void engineNextBytes (byte[] bytes)

Generates and stores random bytes in the given byte[] for each array element.

Parameters
bytes byte: the byte[] to be filled with random bytes.

engineSetSeed

Added in API level 1
void engineSetSeed (byte[] seed)

Reseeds this SecureRandomSpi instance with the specified seed. The seed of this SecureRandomSpi instance is supplemented, not replaced.

Parameters
seed byte: the new seed.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.