spire
spire copied to clipboard
SecureJava should not take a seed
SecureJava has an option to pass a seed through to SecureRandom initially:
def fromBytes(bytes: Array[Byte]): SecureJava =
new SecureJava(new SecureRandom(bytes))
https://github.com/non/spire/blob/master/core/shared/src/main/scala/spire/random/rng/SecureJava.scala#L23
new SecureRandom(seed) is generally considered to be unsafe and non-portable: see http://stackoverflow.com/a/12251473/5266 for details. Ideally it should be deprecated and removed.
This seems pretty uncontroversial.
@wsargent we have deprecated it for now. Leaving this open so we don't forget to remove it.