diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-12-17 20:03:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-18 12:22:46 -0700 |
| commit | 013efaf13987acfa6b41d40f07900c1ea77f5bda (patch) | |
| tree | 14325d114eb66312b3545f3a897142400dfb7c16 /src/glibc.zig | |
| parent | ce65533985caa9e2da567948e36d7d4ba0185005 (diff) | |
| download | zig-013efaf13987acfa6b41d40f07900c1ea77f5bda.tar.gz zig-013efaf13987acfa6b41d40f07900c1ea77f5bda.zip | |
std: introduce a thread-local CSPRNG for general use
std.crypto.random
* cross platform, even freestanding
* can't fail. on initialization for some systems requires calling
os.getrandom(), in which case there are rare but theoretically
possible errors. The code panics in these cases, however the
application may choose to override the default seed function and then
handle the failure another way.
* thread-safe
* supports the full Random interface
* cryptographically secure
* no syscall required to initialize on Linux (AT_RANDOM)
* calls arc4random on systems that support it
`std.crypto.randomBytes` is removed in favor of `std.crypto.random.bytes`.
I moved some of the Random implementations into their own files in the
interest of organization.
stage2 no longer requires passing a RNG; instead it uses this API.
Closes #6704
Diffstat (limited to 'src/glibc.zig')
| -rw-r--r-- | src/glibc.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/glibc.zig b/src/glibc.zig index 901054176e..15c9d743f9 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -936,7 +936,6 @@ fn buildSharedLib( .root_pkg = null, .output_mode = .Lib, .link_mode = .Dynamic, - .rand = comp.rand, .libc_installation = comp.bin_file.options.libc_installation, .emit_bin = emit_bin, .optimize_mode = comp.bin_file.options.optimize_mode, |
