Skip to content

Commit

Permalink
fix: use Uint8Array instead of ArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Feb 16, 2024
1 parent ad5607a commit b623ec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ciphertext } from '@xmtp/proto'
import Ciphertext, { AESGCMNonceSize, KDFSaltSize } from './Ciphertext'
import crypto from './crypto'

const hkdfNoInfo = new ArrayBuffer(0)
const hkdfNoInfo = new Uint8Array().buffer

// This is a variation of https://github.com/paulmillr/noble-secp256k1/blob/main/index.ts#L1378-L1388
// that uses `digest('SHA-256', bytes)` instead of `digest('SHA-256', bytes.buffer)`
Expand Down

0 comments on commit b623ec5

Please sign in to comment.