java.security.SecureRandom: add getInstanceStrong() method

Port SecureRandom to jdk8u60.

The method getInstanceStrong returns a strong random number
generator. In Android this is assumed to be the one from
OpenSSLProvider.

This commit also contains cosmetic JavaDoc changes like
- Use of @code in place of <code> tags and use of a package-info.java in
place of a package.html file.
- Added comments.
- Uses of java.security.util.Debug (commented-out as that
debugging mechanism is not available in Android).
- Added braces in control flow blocks.

Test: make droid docs, vogar SecureRandomTest
Bug: 29631070
Change-Id: I9080fbd5e9292d7cb3eaa234f7c5849411336fac
This commit is contained in:
Sergio Giro
2016-08-30 16:53:53 +01:00
parent 43ec5716aa
commit 23d2e40334
3 changed files with 3 additions and 0 deletions

View File

@@ -55216,6 +55216,7 @@ package java.security {
method public static java.security.SecureRandom getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstanceStrong() throws java.security.NoSuchAlgorithmException;
method public final java.security.Provider getProvider();
method public static byte[] getSeed(int);
method protected final int next(int);

View File

@@ -58572,6 +58572,7 @@ package java.security {
method public static java.security.SecureRandom getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstanceStrong() throws java.security.NoSuchAlgorithmException;
method public final java.security.Provider getProvider();
method public static byte[] getSeed(int);
method protected final int next(int);

View File

@@ -55296,6 +55296,7 @@ package java.security {
method public static java.security.SecureRandom getInstance(java.lang.String) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.lang.String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
method public static java.security.SecureRandom getInstance(java.lang.String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
method public static java.security.SecureRandom getInstanceStrong() throws java.security.NoSuchAlgorithmException;
method public final java.security.Provider getProvider();
method public static byte[] getSeed(int);
method protected final int next(int);