Skip to content

Commit

Permalink
pass hash to sign/verify for completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
chm-diederichs committed Aug 16, 2023
1 parent e755051 commit 3589b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ module.exports = class Core {
for (const val of values) batch.append(val)

const hash = batch.hash()
batch.signature = await auth.sign(batch.signable(hash), batch)
batch.signature = await auth.sign(batch.signable(hash), batch, hash)

const entry = {
userData: null,
Expand Down Expand Up @@ -357,7 +357,7 @@ module.exports = class Core {
}

_signed (batch, hash, auth = this.defaultAuth) {
return auth.verify(batch.signable(hash), batch.signature, batch)
return auth.verify(batch.signable(hash), batch.signature, batch, hash)
}

async _verifyExclusive ({ batch, bitfield, value, from }) {
Expand Down

0 comments on commit 3589b2d

Please sign in to comment.