Package com.dropbox.core.android
Class FixedSecureRandom
- java.lang.Object
-
- java.util.Random
-
- java.security.SecureRandom
-
- com.dropbox.core.android.FixedSecureRandom
-
- All Implemented Interfaces:
java.io.Serializable
public final class FixedSecureRandom extends java.security.SecureRandom
Older versions of Android have a SecureRandom that isn't actually secure. This class implements a workaround. Call the staticget()
method to get a secure SecureRandom instance.This workaround code was recommended by Google in a euphemistically-titled blog post. Our code is slightly different because we're a library so we don't want to change global JVM settings.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FixedSecureRandom.LinuxPrngSecureRandomSpi
SecureRandomSpi
which passes all requests to the Linux PRNG (/dev/urandom
).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.security.SecureRandom
get()
-
Methods inherited from class java.security.SecureRandom
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, nextBytes, reseed, reseed, setSeed, setSeed, toString
-
-