Remove the unnecessary RSAPrivateKey.from_bytes

This commit is contained in:
mhchia 2019-08-22 22:54:14 +08:00
parent c1eacf221f
commit b516579256
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A

View File

@ -35,11 +35,6 @@ class RSAPrivateKey(PrivateKey):
def to_bytes(self) -> bytes:
return self.impl.export_key("DER")
@classmethod
def from_bytes(cls, key_bytes: bytes) -> "RSAPrivateKey":
rsakey = RSA.import_key(key_bytes)
return cls(rsakey)
def get_type(self) -> KeyType:
return KeyType.RSA