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

Function randomBytesChecked

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

Source from the content-addressed store, hash-verified

221 */
222export const make = (randomBytes: (size: number) => Uint8Array): SecureRandom["Service"] => {
223 const randomBytesChecked = (size: number): Uint8Array => {
224 checkSize(size)
225 return randomBytes(size)
226 }
227 const draw = () => randomBytes(7)
228 const uuidV7 = Uuid.makeV7Monotonic()
229 const ulid = Ulid.makeMonotonic()

Callers 1

makeFunction · 0.85

Calls 2

checkSizeFunction · 0.85
randomBytesFunction · 0.85

Tested by

no test coverage detected