format code in PRNGFixes

This commit is contained in:
Hans-Christoph Steiner 2018-12-31 22:13:32 +01:00
parent cf5b9520fb
commit 09abc0734e

View File

@ -10,6 +10,7 @@ package org.fdroid.fdroid.compat;
* freely, as long as the origin is not misrepresented. * freely, as long as the origin is not misrepresented.
*/ */
import android.annotation.SuppressLint;
import android.os.Build; import android.os.Build;
import android.os.Process; import android.os.Process;
import android.util.Log; import android.util.Log;
@ -31,18 +32,23 @@ import java.security.Security;
/** /**
* Fixes for the output of the default PRNG having low entropy. * Fixes for the output of the default PRNG having low entropy.
* * <p>
* The fixes need to be applied via {@link #apply()} before any use of Java * The fixes need to be applied via {@link #apply()} before any use of Java
* Cryptography Architecture primitives. A good place to invoke them is in the * Cryptography Architecture primitives. A good place to invoke them is in the
* application's {@code onCreate}. * application's {@code onCreate}.
*
* @see <a href="http://android-developers.blogspot.jp/2013/08/some-securerandom-thoughts.html">Some SecureRandom Thoughts</a>
*/ */
public final class PRNGFixes { public final class PRNGFixes {
private static final byte[] BUILD_FINGERPRINT_AND_DEVICE_SERIAL = private static final byte[] BUILD_FINGERPRINT_AND_DEVICE_SERIAL =
getBuildFingerprintAndDeviceSerial(); getBuildFingerprintAndDeviceSerial();
/** Hidden constructor to prevent instantiation. */ /**
private PRNGFixes() { } * Hidden constructor to prevent instantiation.
*/
private PRNGFixes() {
}
/** /**
* Applies all fixes. * Applies all fixes.