X Tutup
The Wayback Machine - https://web.archive.org/web/20260313005744/https://github.com/python/cpython/issues/101064
Skip to content

Improve secrets with attribute randrange(n, m) #101064

@NotwhatIwanttotell

Description

@NotwhatIwanttotell

In the original python random (but not secure module) there was an attribute randrange(0, n). Suggest the idea is copyied into secrets as one more attribute; secrets.randrange(n, m)

It would make python programming faster and most likely more crypto secure.
secrets.randrange(2, 13) should create a random integrer between 2 and 12. secrets.randrange(0, 101) would give a number between 0 and 100. If someone wants a 5000-10000 range it would be (5000, 10001) and so on. Think you got the picture.... ;-)

Thanks for looking on this suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup