Close the second round of review findings: public_from_private

This commit is contained in:
bigpickle 2026-10-05 21:51:10 +08:00
parent fc7858ef82
commit 57708eb7ac

View File

@ -37,6 +37,10 @@ def public_bytes(public: PublicKey) -> bytes:
) )
def public_from_private(private: PrivateKey) -> PublicKey:
return private.public_key()
def from_public_bytes(raw: bytes) -> PublicKey: def from_public_bytes(raw: bytes) -> PublicKey:
return Ed25519PublicKey.from_public_bytes(raw) return Ed25519PublicKey.from_public_bytes(raw)