Canonical, order-stable content string an entry commits to. PURE.
(e: Omit<AuditEntry, 'hash'>)
| 54 | |
| 55 | /** Canonical, order-stable content string an entry commits to. PURE. */ |
| 56 | function entryContent(e: Omit<AuditEntry, 'hash'>): string { |
| 57 | return JSON.stringify([e.seq, e.at, e.scope, e.status, e.filesChanged, e.prUrl, e.verification, e.prevHash]); |
| 58 | } |
| 59 | |
| 60 | function sha256(s: string): string { |
| 61 | return createHash('sha256').update(s).digest('hex'); |
no outgoing calls
no test coverage detected