![]() |
VOOZH | about |
The getAlgorithm() method of java.security.SecureRandom class is used to return the name of the algorithm implemented by this SecureRandom object.
Syntax:
public String getAlgorithm()
Return Value: This method returns the name of the algorithm or unknown if the algorithm name cannot be determined.
Below are the examples to illustrate the getAlgorithm() method:
Example 1:
Algorithm: SHA1PRNG
Example 2:
Exception thrown : java.security.NoSuchAlgorithmException: TAJMAHAL SecureRandom not available