diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-04-21 07:41:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 07:41:33 +0200 |
commit | a9b62de8956af50424767408bbe30631c63b331b (patch) | |
tree | 1bedd3362d89ee8b2d4f0b6552630a2e203ef8f0 /lib/std/sysrand.nim | |
parent | 7bce1f8578eafffacd599401e709de279528e68b (diff) | |
download | Nim-a9b62de8956af50424767408bbe30631c63b331b.tar.gz |
CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
Diffstat (limited to 'lib/std/sysrand.nim')
-rw-r--r-- | lib/std/sysrand.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/sysrand.nim b/lib/std/sysrand.nim index 4a2cdd10b..4c51577ac 100644 --- a/lib/std/sysrand.nim +++ b/lib/std/sysrand.nim @@ -10,7 +10,7 @@ ## .. 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 a cryptographically secure pseudorandom number generator ## and should be unpredictable enough for cryptographic applications, @@ -52,10 +52,10 @@ runnableExamples: when not defined(js): - import std/os + import os when defined(posix): - import std/posix + import posix const batchImplOS = defined(freebsd) or defined(openbsd) or (defined(macosx) and not defined(ios)) @@ -243,7 +243,7 @@ elif defined(macosx): """ proc getentropy(p: pointer, size: csize_t): cint {.importc: "getentropy", header: sysrandomHeader.} - # getentropy() fills a buffer with random data, which can be used as input + # getentropy() fills a buffer with random data, which can be used as input # for process-context pseudorandom generators like arc4random(3). # The maximum buffer size permitted is 256 bytes. @@ -310,7 +310,7 @@ proc urandom*(dest: var openArray[byte]): bool = proc urandom*(size: Natural): seq[byte] {.inline.} = ## Returns random bytes suitable for cryptographic use. - ## + ## ## .. warning:: The code hasn't been audited by cryptography experts and ## is provided as-is without guarantees. Use at your own risks. For production ## systems we advise you to request an external audit. |