Пример #1
0
def show_details():
    details = {
        'Node Address': gethostname.get_hostname(),
        'Public Key': onionrcrypto.pub_key.replace('=', ''),
        'Human-readable Public Key': mnemonickeys.get_human_readable_ID()
    }

    for detail in details:
        logger.info('%s%s: \n%s%s\n' %
                    (logger.colors.fg.lightgreen, detail,
                     logger.colors.fg.green, details[detail]),
                    terminal=True)
Пример #2
0
def show_details():
    """Print out details.

    node transport address(es)
    active user ID
        active user ID in mnemonic form
    """
    details = {
        'Data directory': identifyhome.identify_home(),
        'Node Address': gethostname.get_hostname(),
        'Public Key': onionrcrypto.pub_key.replace('=', ''),
        'Human-readable Public Key': mnemonickeys.get_human_readable_ID()
    }

    for detail in details:
        logger.info('%s%s: \n%s%s\n' %
                    (logger.colors.fg.lightgreen, detail,
                     logger.colors.fg.green, details[detail]),
                    terminal=True)
Пример #3
0
 def getHumanReadable(name):
     name = unpaddedbase32.repad(bytesconverter.str_to_bytes(name))
     return Response(mnemonickeys.get_human_readable_ID(name))
Пример #4
0
 def getHumanReadableDefault():
     return Response(mnemonickeys.get_human_readable_ID())
Пример #5
0
 def test_human_readable_length(self):
     human = mnemonickeys.get_human_readable_ID()
     self.assertTrue(len(human.split('-')) == 16)