mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
crypto: fix test-crypto-random.js (#18044)
Co-authored-by: Meghan Denny <meghan@bun.sh>
This commit is contained in:
@@ -1387,7 +1387,7 @@ pub const PostgresSQLConnection = struct {
|
||||
pub fn nonce(this: *SASL) []const u8 {
|
||||
if (this.nonce_len == 0) {
|
||||
var bytes: [nonce_byte_len]u8 = .{0} ** nonce_byte_len;
|
||||
bun.rand(&bytes);
|
||||
bun.csprng(&bytes);
|
||||
this.nonce_len = @intCast(bun.base64.encode(&this.nonce_base64_bytes, &bytes));
|
||||
}
|
||||
return this.nonce_base64_bytes[0..this.nonce_len];
|
||||
|
||||
Reference in New Issue
Block a user