add ed25519 private key deserializer

This commit is contained in:
Alex Stokes
2019-09-24 09:50:03 -07:00
parent bbd8279811
commit 487c923791
2 changed files with 8 additions and 2 deletions

View File

@ -47,6 +47,11 @@ class Ed25519PrivateKey(PrivateKey):
def to_bytes(self) -> bytes:
return bytes(self.impl)
@classmethod
def from_bytes(cls, data: bytes) -> "Ed25519PrivateKey":
impl = PrivateKeyImpl(data)
return cls(impl)
def get_type(self) -> KeyType:
return KeyType.Ed25519