com.rsa.certj.spi.random

Interface RandomInterface


public interface RandomInterface

This interface specifies the random number Service Programming Interface (SPI) methods, getRandomObject and updateRandom.

Copyright © RSA Security Inc., 1999-2001. All rights reserved.


Method Summary

 com.rsa.jsafe.JSAFE_SecureRandom

getRandomObject()

Returns a JSAFE_SecureRandom object which is seeded, if necessary.

 void

updateRandom()

Gives the random service provider an opportunity to gather random bits of information from the operating environment.

 

Method Detail

getRandomObject

public com.rsa.jsafe.JSAFE_SecureRandom getRandomObject()
                                                 throws NotSupportedException,
                                                        RandomException
Returns a JSAFE_SecureRandom object which is seeded, if necessary.

Returns

A JSAFE_SecureRandom object that is used to generate random bytes.

Throws

NotSupportedException - If this method is not supported by the provider for a given set of arguments.

RandomException - If the random provider fails.

updateRandom

public void updateRandom()
                  throws NotSupportedException,
                         RandomException
Gives the random service provider an opportunity to gather random bits of information from the operating environment. A software-based random number generator might add the collected random bits to an internal pool. A hardware random number generator would probably ignore calls to this routine.

Throws

NotSupportedException - If this method is not supported by the provider for a given set of arguments.

RandomException - If the random provider fails.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000