Skip to content

Commit

Permalink
add warnings to std/sysrand (nim-lang#17191)
Browse files Browse the repository at this point in the history
* remove unnecessary when statement

* remove outdated codes

* add warnings to std/sysrand

* Update lib/std/sysrand.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 22, 2021
1 parent a387244 commit fe295b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/std/sysrand.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# distribution, for details about the copyright.
#

## .. warning:: This module was added in Nim 1.6. If you are using it for cryptographic purposes,
## keep in mind that so far this has not been audited by any security professionals,
## therefore may not be secure.
##
## `std/sysrand` generates random numbers from a secure source provided by the operating system.
## It is also called Cryptographically secure pseudorandom number generator.
## It should be unpredictable enough for cryptographic applications,
Expand Down

0 comments on commit fe295b4

Please sign in to comment.