bugfix
This commit is contained in:
parent
babc1a4040
commit
df645fbc86
@ -49,7 +49,7 @@ class DataEncoder:
|
|||||||
if self.private_file:
|
if self.private_file:
|
||||||
self.private_key = self.rsa.read_privatekey(self.private_file)
|
self.private_key = self.rsa.read_privatekey(self.private_file)
|
||||||
else:
|
else:
|
||||||
self.private_key = rsa.create_privaatekey()
|
self.private_key = self.rsa.create_privatekey()
|
||||||
self.public_key = self.rsa.create_publickey(self.private_key)
|
self.public_key = self.rsa.create_publickey(self.private_key)
|
||||||
|
|
||||||
def identify_datatype(self, data):
|
def identify_datatype(self, data):
|
||||||
@ -61,8 +61,7 @@ class DataEncoder:
|
|||||||
return DATA_TYPE_JSON, data
|
return DATA_TYPE_JSON, data
|
||||||
|
|
||||||
def my_text_publickey(self):
|
def my_text_publickey(self):
|
||||||
pk = self.public_key()
|
return self.rsa.publickeyText(self.public_key)
|
||||||
return self.rsa.publickeyText(pk)
|
|
||||||
|
|
||||||
def exist_peer_publickeys(self, peer_id):
|
def exist_peer_publickeys(self, peer_id):
|
||||||
return True if self.public_keys.get(peer_id, False) else False
|
return True if self.public_keys.get(peer_id, False) else False
|
||||||
|
Loading…
Reference in New Issue
Block a user