aboutsummaryrefslogtreecommitdiff
path: root/src/glibc.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-12-17 20:03:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-12-18 12:22:46 -0700
commit013efaf13987acfa6b41d40f07900c1ea77f5bda (patch)
tree14325d114eb66312b3545f3a897142400dfb7c16 /src/glibc.zig
parentce65533985caa9e2da567948e36d7d4ba0185005 (diff)
downloadzig-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.zig1
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,