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

Function randomBytesUnsafe

packages/effect/src/crypto/SecureRandom.ts:306–309  ·  view source on GitHub ↗
(size: number)

Source from the content-addressed store, hash-verified

304 * @since 4.0.0
305 */
306export const randomBytesUnsafe = (size: number): Uint8Array => {
307 checkSize(size)
308 return fillRandom(globalThis.crypto, size)
309}
310
311/**
312 * Synchronously generates a UUIDv4 from `globalThis.crypto`, as a lowercase

Callers 1

ulidRandomBytesUnsafeFunction · 0.85

Calls 2

checkSizeFunction · 0.85
fillRandomFunction · 0.85

Tested by

no test coverage detected