computeIntegrity
Computes the integrity of data with algorithm.
Computes the integrity of data with algorithm.
This is the write side of integrity: use it when publishing a bundle to produce the string a source or updater later verifies against.
function computeIntegrity(algorithm: IntegrityAlgorithm, data: Uint8Array<ArrayBuffer>): Integrity;Parameters
Prop
Type
Returns
Integrity
Examples
const integrity = computeIntegrity('sha256', data).serialize();
// "sha256:n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg="