fixed friends
parent
215c8d2c3a
commit
e2832afacb
|
@ -31,7 +31,7 @@ class ContactManager(onionrusers.OnionrUser):
|
||||||
try:
|
try:
|
||||||
if mnemonickeys.DELIMITER in publicKey:
|
if mnemonickeys.DELIMITER in publicKey:
|
||||||
publicKey = mnemonickeys.get_base32(publicKey.split(mnemonickeys.DELIMITER))
|
publicKey = mnemonickeys.get_base32(publicKey.split(mnemonickeys.DELIMITER))
|
||||||
publicKey = unpaddedbase32.b32encode(bytesconverter.str_to_bytes(publicKey))
|
#publicKey = unpaddedbase32.b32encode(bytesconverter.str_to_bytes(publicKey))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
publicKey = bytesconverter.bytes_to_str(unpaddedbase32.repad(bytesconverter.str_to_bytes(publicKey)))
|
publicKey = bytesconverter.bytes_to_str(unpaddedbase32.repad(bytesconverter.str_to_bytes(publicKey)))
|
||||||
|
|
|
@ -40,4 +40,8 @@ def get_human_readable_ID(pub=''):
|
||||||
|
|
||||||
def get_base32(words):
|
def get_base32(words):
|
||||||
'''converts mnemonic to base32'''
|
'''converts mnemonic to base32'''
|
||||||
|
try:
|
||||||
return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.split(DELIMITER)))
|
return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.split(DELIMITER)))
|
||||||
|
except AttributeError:
|
||||||
|
ret = unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words))
|
||||||
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue