MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / shortStableHash

Function shortStableHash

packages/core/sdk/src/oauth-service.ts:316–323  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

314 .replace(/^-+|-+$/g, "");
315
316const shortStableHash = (value: string): string => {
317 let hash = 0x811c9dc5;
318 for (let i = 0; i < value.length; i += 1) {
319 hash ^= value.charCodeAt(i);
320 hash = Math.imul(hash, 0x01000193);
321 }
322 return (hash >>> 0).toString(36);
323};
324
325const dcrClientSlug = (
326 issuer: string | null,

Callers 1

dcrClientSlugFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected