From 54b55b98f182bf2b6ed533c8e697f1dbd5a1c616 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 17 Feb 2024 18:18:24 -0300 Subject: [PATCH] nip44: get rid of ensureBytes() since it was removed from upstream library. --- nip44.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nip44.ts b/nip44.ts index 26b917f..994a075 100644 --- a/nip44.ts +++ b/nip44.ts @@ -1,5 +1,5 @@ import { chacha20 } from '@noble/ciphers/chacha' -import { ensureBytes, equalBytes } from '@noble/ciphers/utils' +import { equalBytes } from '@noble/ciphers/utils' import { secp256k1 } from '@noble/curves/secp256k1' import { extract as hkdf_extract, expand as hkdf_expand } from '@noble/hashes/hkdf' import { hmac } from '@noble/hashes/hmac' @@ -23,8 +23,6 @@ const u = { }, getMessageKeys(conversationKey: Uint8Array, nonce: Uint8Array) { - ensureBytes(conversationKey, 32) - ensureBytes(nonce, 32) const keys = hkdf_expand(sha256, conversationKey, nonce, 76) return { chacha_key: keys.subarray(0, 32),