keyset not byte array

This commit is contained in:
callebtc
2022-10-09 21:58:19 +02:00
parent 6785f79da9
commit a5eefb80b0
3 changed files with 19 additions and 15 deletions

View File

@@ -30,6 +30,6 @@ def derive_pubkeys(keys: Dict[int, PrivateKey]):
def derive_keyset_id(keys: Dict[str, PublicKey]):
"""Deterministic derivation keyset_id from set of public keys."""
pubkeys_concat = "".join([p.serialize().hex() for _, p in keys.items()])
return base64.b64encode(hashlib.sha256((pubkeys_concat).encode("utf-8")).digest())[
:12
]
return base64.b64encode(
hashlib.sha256((pubkeys_concat).encode("utf-8")).digest()
).decode()[:12]