util.py - implemented generate key method

This commit is contained in:
Oscar Krause 2022-12-28 14:30:42 +01:00
parent 8633190e97
commit 2663901988
1 changed files with 4 additions and 0 deletions

View File

@ -15,3 +15,7 @@ def load_file(filename) -> bytes:
def load_key(filename) -> RsaKey:
return RSA.import_key(extern_key=load_file(filename), passphrase=None)
def generate_key() -> RsaKey:
return RSA.generate(bits=2048)