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

Function sha256

packages/sql/pg/src/PgAuth.ts:55–55  ·  view source on GitHub ↗
(data: Uint8Array)

Source from the content-addressed store, hash-verified

53const bytesOf = (value: Uint8Array): Uint8Array => Uint8Array.from(value)
54
55const sha256 = (data: Uint8Array): Uint8Array => bytesOf(createHash("sha256").update(data).digest())
56
57const hmacSha256 = (key: Uint8Array, data: Uint8Array): Uint8Array =>
58 bytesOf(createHmac("sha256", key).update(data).digest())

Callers 1

scramContinueUnsafeFunction · 0.70

Calls 3

bytesOfFunction · 0.70
updateMethod · 0.65
digestMethod · 0.45

Tested by

no test coverage detected