Skip to content

SecureJava should not take a seed  #547

@wsargent

Description

@wsargent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions