Skip to content

basalt / audit/src / computeAuditHash

Function: computeAuditHash() ​

> computeAuditHash(entry, key?): string

Defined in: audit/src/chain.ts:165

The legacy (v1) hash of entry given its prevHash (genesis when absent): a bare 64-hex SHA-256, or HMAC-SHA256 when a key is given. It names neither algorithm nor key. Audit no longer writes it — see computeAuditHashV2 — but still verifies entries that carry it.

Parameters ​

entry ​

AuditEntry

key? ​

AuditIntegrityKey

Returns ​

string

Released under the MIT License.