MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / equalLengthStringsMatch

Function equalLengthStringsMatch

packages/worker-utils/src/callback-token.ts:25–36  ·  view source on GitHub ↗
(expected: string, actual: string)

Source from the content-addressed store, hash-verified

23}
24
25function equalLengthStringsMatch(expected: string, actual: string): boolean {
26 if (expected.length !== actual.length) {
27 return false;
28 }
29
30 let mismatch = 0;
31 for (let index = 0; index < expected.length; index += 1) {
32 mismatch |= expected.charCodeAt(index) ^ actual.charCodeAt(index);
33 }
34
35 return mismatch === 0;
36}
37
38function hasCallbackTokenSecret(secret: string | null | undefined): secret is string {
39 return typeof secret === 'string' && secret.trim().length > 0;

Callers 1

verifyCallbackTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected