예제 #1
0
def decrypt(encrypted, privatekey):
	back = CryptMessage.getEcc(privatekey).decrypt(encrypted)
	return back.decode("utf8")
예제 #2
0
 def decrypt(self, encrypted, privatekey):
     back = CryptMessage.getEcc(privatekey).decrypt(encrypted)
     return back.decode("utf8")
예제 #3
0
def encrypt(text, publickey):
	encrypted = CryptMessage.encrypt(text, CryptMessage.toOpensslPublickey(publickey))
	return encrypted
예제 #4
0
 def encrypt(self, text, publickey):
     encrypted = CryptMessage.encrypt(text, CryptMessage.toOpensslPublickey(publickey))
     return encrypted