MCPcopy Create free account
hub / github.com/Effect-TS/effect / randomBytes

Function randomBytes

packages/effect/src/Crypto.ts:224–224  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

222 const randomBytesUnsafe = impl.randomBytes
223
224 const randomBytes: Crypto["randomBytes"] = (size) => Effect.map(validateSize("randomBytes", size), randomBytesUnsafe)
225
226 const readUint53 = (bytes: Uint8Array): number =>
227 ((bytes[0] & 0x1f) * 2 ** 48) + (bytes[1] * 2 ** 40) + (bytes[2] * 2 ** 32) +

Callers

nothing calls this directly

Calls 2

validateSizeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected