com.ibm.crypto.fips.provider

Class SecureRandom

  1. java.lang.Object
  2. extended byjava.security.SecureRandomSpi
  3. extended bycom.ibm.crypto.fips.provider.SecureRandom
All implemented interfaces:
AlgorithmStatus, java.io.Serializable

  1. public final class SecureRandom
  2. extends java.security.SecureRandomSpi
  3. implements java.io.Serializable, AlgorithmStatus

This class provides a cryptographically strong pseudo-random number generator based on the SHA1 message digest algorithm. Note that if a seed is not provided, we will generate a seed from a true random number generator(TRNG).

Author:
John Peck
See Also:
Serialized Form

Constructor Summary

Constructor and Description
SecureRandom()
SecureRandom(byte[] seed)

Method Summary

Modifier and Type Method and Description
  1. byte[]
engineGenerateSeed(int numBytes)
  1. void
engineNextBytes(byte[] bytes)
  1. void
engineSetSeed(byte[] seed)
  1. protected
  2. byte[]
internalGenerateSeed(int numBytes)
  1. protected
  2. void
internalNextBytes(byte[] bytes)
  1. protected
  2. void
internalSetSeed(byte[] seed)
  1. boolean
isFipsApproved()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SecureRandom

  1. public SecureRandom()

SecureRandom

  1. public SecureRandom(byte[] seed)

Method Detail

isFipsApproved

  1. public boolean isFipsApproved()
Description copied from interface: AlgorithmStatus
Module identifies if the cryptographic operation (algorithm) is FIPS certified
Specified by:
See Also:

engineSetSeed

  1. public void engineSetSeed(byte[] seed)
Specified by:
engineSetSeed in class java.security.SecureRandomSpi

internalSetSeed

  1. protected void internalSetSeed( byte[] seed)

engineNextBytes

  1. public void engineNextBytes(byte[] bytes)
Specified by:
engineNextBytes in class java.security.SecureRandomSpi

internalNextBytes

  1. protected void internalNextBytes( byte[] bytes)

engineGenerateSeed

  1. public byte[] engineGenerateSeed( int numBytes)
Specified by:
engineGenerateSeed in class java.security.SecureRandomSpi

internalGenerateSeed

  1. protected byte[] internalGenerateSeed( int numBytes)