cache_to_disk broken
This commit is contained in:
parent
35243fdba6
commit
1d8361cc5f
2 changed files with 0 additions and 4 deletions
|
@ -1,12 +1,10 @@
|
|||
# https://stackoverflow.com/a/18266970
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Hash import HMAC
|
||||
from struct import pack
|
||||
from hashlib import sha3_512
|
||||
from cryptography.hazmat.primitives.serialization import load_der_private_key
|
||||
from functools import cache
|
||||
from cache_to_disk import cache_to_disk
|
||||
|
||||
|
||||
class PRNG(object):
|
||||
|
@ -22,7 +20,6 @@ class PRNG(object):
|
|||
return result
|
||||
|
||||
|
||||
@cache_to_disk(30)
|
||||
def _generate_deterministic_rsa_private_key(secret_bytes):
|
||||
return RSA.generate(2048, randfunc=PRNG(secret_bytes)).export_key('DER')
|
||||
|
||||
|
|
|
@ -3,5 +3,4 @@ pycryptodome
|
|||
PyNaCl
|
||||
PyYAML
|
||||
pyqrcode
|
||||
cache_to_disk
|
||||
setuptools
|
||||
|
|
Loading…
Reference in a new issue