From 751c1a3c7d8463510d8151489f55fa0bd7bf0f7d Mon Sep 17 00:00:00 2001 From: jeffthibault Date: Wed, 26 Oct 2022 07:32:24 -0400 Subject: [PATCH] make hashfn a keyword argument for ecdh --- nostr/key.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostr/key.py b/nostr/key.py index 9a0b6ba..ddf28ca 100644 --- a/nostr/key.py +++ b/nostr/key.py @@ -31,7 +31,7 @@ def tweak_add_private_key(private_key: str, scalar: bytes) -> str: def compute_shared_secret(sender_private_key: str, receiver_public_key: str) -> str: public_key = PublicKey(bytes.fromhex("02" + receiver_public_key), True) - return public_key.ecdh(bytes.fromhex(sender_private_key), copy_x).hex() + return public_key.ecdh(bytes.fromhex(sender_private_key), hashfn=copy_x).hex() def encrypt_message(content: str, shared_secret: str) -> str: iv = os.urandom(16)