Update passwordalchemy.py
parent
62d5e72bc9
commit
224918ccf6
|
@ -54,7 +54,7 @@ class mainfuncs:
|
||||||
#store a credential
|
#store a credential
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def store(args):
|
def store(args):
|
||||||
with open("pub.pem") as pemfile:
|
with open("pub.pem","r") as pemfile:
|
||||||
#load rsa public key
|
#load rsa public key
|
||||||
pubkey=rsa.PublicKey._load_pkcs1_pem(pemfile.read())
|
pubkey=rsa.PublicKey._load_pkcs1_pem(pemfile.read())
|
||||||
#encrypted credential
|
#encrypted credential
|
||||||
|
@ -65,7 +65,7 @@ class mainfuncs:
|
||||||
#update a credential
|
#update a credential
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update(args):
|
def update(args):
|
||||||
with open("pub.pem") as pemfile:
|
with open("pub.pem","r") as pemfile:
|
||||||
#load rsa public key
|
#load rsa public key
|
||||||
pubkey=rsa.PublicKey._load_pkcs1_pem(pemfile.read())
|
pubkey=rsa.PublicKey._load_pkcs1_pem(pemfile.read())
|
||||||
#encrypted credential
|
#encrypted credential
|
||||||
|
|
Loading…
Reference in New Issue