Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / xxhash

Function: xxhash()

ts
function xxhash(input, seed?): string;

Defined in: packages/core/src/utils/hash.ts:37

Pure-JS XXH32 implementation. Used by the memory-modification guard — fast, non-cryptographic content fingerprinting (xxhash(content) tracks whether a tool's view of memory has shifted while the LLM was thinking).

Not security-sensitive — never use for tampering detection of an untrusted attacker; for that the audit log uses SHA-256 (in @graphorin/security).

Parameters

ParameterTypeDefault value
inputstring | Uint8Array<ArrayBufferLike>undefined
seednumber0

Returns

string

Stable