authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-02-07 20:50:19+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-02-22 22:39:40-05:00
log4b0f77cc1f2f4939c59e92175f6e69394eb3bcef
tree33eb82fc75b6fd15fd3a386ed9912e60e13cf1d7
parent84aac8b6c7721d53a93e636e803e867933ae6e99

std.crypto.tlcsprng: Fix hardcoded use of defaultRandomSeed()

Instead of hardcoding a call to defaultRandomSeed() use the customizable std.options.cryptoRandomSeed() like in the rest of the function. Closes #19943.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/crypto/tlcsprng.zig+1-1
......@@ -53,7 +53,7 @@ fn tlsCsprngFill(_: *anyopaque, buffer: []u8) void {
5353 // std.crypto.random always make an OS syscall, rather than rely on an
5454 // application implementation of a CSPRNG.
5555 if (std.options.crypto_always_getrandom) {
56 return defaultRandomSeed(buffer);
56 return std.options.cryptoRandomSeed(buffer);
5757 }
5858
5959 if (wipe_mem.len == 0) {