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

Function signChainHead

src/cli/maintain-audit.ts:112–114  ·  view source on GitHub ↗
(head: string, key: string)

Source from the content-addressed store, hash-verified

110
111/** HMAC-SHA256 over the chain head. PURE (deterministic). */
112export function signChainHead(head: string, key: string): string {
113 return createHmac('sha256', key).update(head).digest('hex');
114}
115
116/** Timing-safe verification of a head signature. PURE. */
117export function verifyChainSignature(head: string, signature: string, key: string): boolean {

Callers 4

serializeMaintainHistoryFunction · 0.85
verifyChainSignatureFunction · 0.85
buildSignedAuditLogFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected