Skip to content

Commit

Permalink
Merge pull request #50 from ensdomains/fix/sha256-buffer
Browse files Browse the repository at this point in the history
fix: convert sha256 output to buffer
  • Loading branch information
TateB authored Jan 16, 2024
2 parents 30340f9 + d6e4885 commit 4ca4f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prove.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sha256 } from '@noble/hashes/sha256'
import * as packet from 'dns-packet'
import * as packet_types from 'dns-packet/types'
import { sha256 } from '@noble/hashes/sha256'
import { logger } from './log'

export const DEFAULT_TRUST_ANCHORS: packet.Ds[] = [
Expand Down Expand Up @@ -234,7 +234,7 @@ export const DEFAULT_DIGESTS = {
2: {
name: 'SHA256',
f: (data: Buffer, digest: Buffer) => {
return digest.equals(sha256(data))
return digest.equals(Buffer.from(sha256(data)))
},
},
}
Expand Down

0 comments on commit 4ca4f0b

Please sign in to comment.