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

Function hmacSha256

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

Source from the content-addressed store, hash-verified

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())
59
60const xor = (left: Uint8Array, right: Uint8Array): Uint8Array => {
61 const result = new Uint8Array(left.length)

Callers 1

scramContinueUnsafeFunction · 0.85

Calls 3

bytesOfFunction · 0.70
updateMethod · 0.65
digestMethod · 0.45

Tested by

no test coverage detected