UNPKG

jsonld-signatures-merkleproof2019

Version:

A jsonld signature implementation to support MerkleProof2019 verification in Verifiable Credential context

14 lines (11 loc) 345 B
import VerifierError from '../models/VerifierError.js'; import getText from '../helpers/getText.js'; export default function ensureHashesEqual (actual: string, expected: string): boolean { if (actual !== expected) { throw new VerifierError( 'compareHashes', getText('errors', 'ensureHashesEqual') ); } return true; }