MCPcopy Index your code
hub / github.com/bytecodealliance/ComponentizeJS / getRandomBytes

Function getRandomBytes

test/cases/wall-clock/random-t.js:3–5  ·  view source on GitHub ↗
(len)

Source from the content-addressed store, hash-verified

1import { randomBytes } from "node:crypto";
2
3export function getRandomBytes(len) {
4 return randomBytes(Number(len));
5}
6
7export function getRandomU64 () {
8 return new BigUint64Array(randomBytes(8).buffer)[0];

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected