mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
Fix syntax
This commit is contained in:
parent
d5d5e1d199
commit
163e09bfeb
2
44.md
2
44.md
|
@ -223,7 +223,7 @@ def hmac_aad(key, message, aad):
|
|||
|
||||
# Calculates long-term key between users A and B: `get_key(Apriv, Bpub) == get_key(Bpriv, Apub)`
|
||||
def get_conversation_key(private_key_a, public_key_b, salt):
|
||||
if (!salt) salt = utf8_encode('nip44-v2')
|
||||
if not salt: salt = utf8_encode('nip44-v2')
|
||||
if len(salt) > 32: raise Exception('invalid salt length')
|
||||
shared_x = secp256k1_ecdh(private_key_a, public_key_b)
|
||||
return hkdf_extract(IKM=shared_x, salt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user