Skip to content

Deprecate Random() default constructor, replace with Random.insecure() #59715

Open
@natebosch

Description

@natebosch

Using an insecure seed for a random source is the wrong choice for many typical uses of random input. It would be easier to catch misuse if the constructor had a more obvious name. The default constructor, if anything, should be the safer version. If we think we can get away with changing behavior for current usage we could change the unnamed constructor to secure and add and insecure name constructor. If we think changing behavior is too risky (I lean this way) we can keep both named for the long term and deprecate the unnamed.

@lrhn what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.library-math

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions