Skip to content
Snippets Groups Projects
Commit dec3b867 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] Use static method to load private key file

parent 08077e86
No related branches found
No related tags found
No related merge requests found
Pipeline #4374 passed
...@@ -68,7 +68,6 @@ class SigningKey(libnacl.sign.Signer): ...@@ -68,7 +68,6 @@ class SigningKey(libnacl.sign.Signer):
return cls(seed) return cls(seed)
def save_private_key(self, path: str) -> None: def save_private_key(self, path: str) -> None:
""" """
Save authentication file Save authentication file
...@@ -77,7 +76,7 @@ class SigningKey(libnacl.sign.Signer): ...@@ -77,7 +76,7 @@ class SigningKey(libnacl.sign.Signer):
""" """
self.save(path) self.save(path)
@staticmethod
def from_private_key(path: str) -> SigningKeyType: def from_private_key(path: str) -> SigningKeyType:
""" """
Read authentication file Read authentication file
...@@ -89,7 +88,6 @@ class SigningKey(libnacl.sign.Signer): ...@@ -89,7 +88,6 @@ class SigningKey(libnacl.sign.Signer):
key.pubkey = Base58Encoder.encode(key.vk) key.pubkey = Base58Encoder.encode(key.vk)
return key return key
def decrypt_seal(self, message: bytes) -> str: def decrypt_seal(self, message: bytes) -> str:
""" """
Decrypt message with a curve25519 version of the ed25519 key pair Decrypt message with a curve25519 version of the ed25519 key pair
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment