MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / keyIdFor

Function keyIdFor

src/cli/maintain-audit.ts:107–109  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

105
106/** A non-secret label for a key: a short hash prefix, so an exported log says WHICH key signed it. PURE. */
107export function keyIdFor(key: string): string {
108 return sha256('qodex-audit-key:' + key).slice(0, 12);
109}
110
111/** HMAC-SHA256 over the chain head. PURE (deterministic). */
112export function signChainHead(head: string, key: string): string {

Callers 3

serializeMaintainHistoryFunction · 0.85
buildSignedAuditLogFunction · 0.85

Calls 1

sha256Function · 0.85

Tested by

no test coverage detected