From 60ec3e2417a67e15aea9de3ae2c0ede59503b574 Mon Sep 17 00:00:00 2001 From: flywind Date: Sat, 27 Feb 2021 03:06:20 +0800 Subject: [PATCH] add warnings to std/sysrand (#17191) * 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 Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> --- lib/std/sysrand.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/sysrand.nim b/lib/std/sysrand.nim index 5ccbd21be5..603c132e83 100644 --- a/lib/std/sysrand.nim +++ b/lib/std/sysrand.nim @@ -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,