Close the second round of review findings: public_from_private

This commit is contained in:
bigpickle 2026-10-05 21:51:10 +08:00 committed by leora
parent 5a20bae6a6
commit 2d05f72656

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)