MCPcopy Create free account
hub / github.com/arctic-cli/interface / hashText

Function hashText

packages/arctic/src/auth/antigravity-oauth/cache.ts:94–96  ·  view source on GitHub ↗

* Hashes text content into a stable, Unicode-safe key. * * Uses SHA-256 over UTF-8 bytes and truncates to keep memory usage bounded.

(text: string)

Source from the content-addressed store, hash-verified

92 * Uses SHA-256 over UTF-8 bytes and truncates to keep memory usage bounded.
93 */
94function hashText(text: string): string {
95 return createHash("sha256").update(text, "utf8").digest("hex").slice(0, SIGNATURE_TEXT_HASH_HEX_LEN);
96}
97
98/**
99 * Caches a thinking signature for a given session and text.

Callers 2

cacheSignatureFunction · 0.85
getCachedSignatureFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected