From b5165792564b2c16a49e180fb0291873cb4e1252 Mon Sep 17 00:00:00 2001 From: mhchia Date: Thu, 22 Aug 2019 22:54:14 +0800 Subject: [PATCH] Remove the unnecessary RSAPrivateKey.from_bytes --- libp2p/crypto/rsa.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libp2p/crypto/rsa.py b/libp2p/crypto/rsa.py index a0f8439..ed8c215 100644 --- a/libp2p/crypto/rsa.py +++ b/libp2p/crypto/rsa.py @@ -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