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

Function makeCrypto

packages/effect/test/Crypto.test.ts:12–25  ·  view source on GitHub ↗
(value: bigint)

Source from the content-addressed store, hash-verified

10})
11
12const makeCrypto = (value: bigint) =>
13 Crypto.make({
14 randomBytes: () =>
15 Uint8Array.of(
16 Number((value >> 48n) & 0x3fn),
17 Number((value >> 40n) & 0xffn),
18 Number((value >> 32n) & 0xffn),
19 Number((value >> 24n) & 0xffn),
20 Number((value >> 16n) & 0xffn),
21 Number((value >> 8n) & 0xffn),
22 Number(value & 0xffn)
23 ),
24 digest: (_algorithm, data) => Effect.succeed(data)
25 })
26
27describe("Crypto", () => {
28 it("supports string literal digest algorithms", () => {

Callers 1

Crypto.test.tsFile · 0.85

Calls 4

makeMethod · 0.65
ofMethod · 0.65
NumberInterface · 0.50
succeedMethod · 0.45

Tested by

no test coverage detected