def decrypt(encrypted, privatekey): back = CryptMessage.getEcc(privatekey).decrypt(encrypted) return back.decode("utf8")
def decrypt(self, encrypted, privatekey): back = CryptMessage.getEcc(privatekey).decrypt(encrypted) return back.decode("utf8")
def encrypt(text, publickey): encrypted = CryptMessage.encrypt(text, CryptMessage.toOpensslPublickey(publickey)) return encrypted
def encrypt(self, text, publickey): encrypted = CryptMessage.encrypt(text, CryptMessage.toOpensslPublickey(publickey)) return encrypted