MCPcopy Index your code
hub / github.com/massCodeIO/massCode / isSameHash

Function isSameHash

src/main/api/integrations/auth.ts:16–25  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

14}
15
16function isSameHash(a: string, b: string): boolean {
17 const aBuffer = Buffer.from(a, 'hex')
18 const bBuffer = Buffer.from(b, 'hex')
19
20 if (aBuffer.length !== bBuffer.length) {
21 return false
22 }
23
24 return timingSafeEqual(aBuffer, bBuffer)
25}
26
27export function generateIntegrationToken(): {
28 token: string

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected