mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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.
This commit is contained in:
parent
84aac8b6c7
commit
4b0f77cc1f
@ -53,7 +53,7 @@ fn tlsCsprngFill(_: *anyopaque, buffer: []u8) void {
|
|||||||
// std.crypto.random always make an OS syscall, rather than rely on an
|
// std.crypto.random always make an OS syscall, rather than rely on an
|
||||||
// application implementation of a CSPRNG.
|
// application implementation of a CSPRNG.
|
||||||
if (std.options.crypto_always_getrandom) {
|
if (std.options.crypto_always_getrandom) {
|
||||||
return defaultRandomSeed(buffer);
|
return std.options.cryptoRandomSeed(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wipe_mem.len == 0) {
|
if (wipe_mem.len == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user