diff --git a/src/crypto/encryption.ts b/src/crypto/encryption.ts index 0e9460acb..8398cd8f2 100644 --- a/src/crypto/encryption.ts +++ b/src/crypto/encryption.ts @@ -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)`