(key: string)
| 105 | |
| 106 | /** A non-secret label for a key: a short hash prefix, so an exported log says WHICH key signed it. PURE. */ |
| 107 | export 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). */ |
| 112 | export function signChainHead(head: string, key: string): string { |
no test coverage detected