From df645fbc86bb7e591516e6b000183e9d972aecfe Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 14 Jul 2021 11:13:37 +0800 Subject: [PATCH] bugfix --- appPublic/dataencoder.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/appPublic/dataencoder.py b/appPublic/dataencoder.py index d89bd6d..d7e6d92 100644 --- a/appPublic/dataencoder.py +++ b/appPublic/dataencoder.py @@ -49,7 +49,7 @@ class DataEncoder: if self.private_file: self.private_key = self.rsa.read_privatekey(self.private_file) else: - self.private_key = rsa.create_privaatekey() + self.private_key = self.rsa.create_privatekey() self.public_key = self.rsa.create_publickey(self.private_key) def identify_datatype(self, data): @@ -61,8 +61,7 @@ class DataEncoder: return DATA_TYPE_JSON, data def my_text_publickey(self): - pk = self.public_key() - return self.rsa.publickeyText(pk) + return self.rsa.publickeyText(self.public_key) def exist_peer_publickeys(self, peer_id): return True if self.public_keys.get(peer_id, False) else False