Add logging
This commit is contained in:
parent
28c910c9d7
commit
e2e20a5dc8
@ -143,6 +143,7 @@ export class Crypto extends EventEmitter<{ lock: void }> implements IDisposable
|
||||
export function assertHMac(data: Buffer, key: Buffer, expected: Buffer) {
|
||||
const actual = createHmac("sha256", key).update(data).digest()
|
||||
if (!actual.equals(expected)) {
|
||||
console.error({ actual, expected })
|
||||
throw new HMACAssertionError()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user