Encrypted pubkeys #506
|
@ -197,7 +197,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
|||
else:
|
||||
chan = False
|
||||
label = shared.config.get(addressInKeysFile, 'label')
|
||||
if method == listAddresses2:
|
||||
if method == 'listAddresses2':
|
||||
label = label.encode('base64')
|
||||
data += json.dumps({'label': label, 'address': addressInKeysFile, 'stream':
|
||||
streamNumber, 'enabled': shared.config.getboolean(addressInKeysFile, 'enabled'), 'chan': chan}, indent=4, separators=(',', ': '))
|
||||
|
|
|
@ -21,14 +21,6 @@ class addressGenerator(threading.Thread):
|
|||
queueValue = shared.addressGeneratorQueue.get()
|
||||
nonceTrialsPerByte = 0
|
||||
payloadLengthExtraBytes = 0
|
||||
try:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = shared.config.getint(
|
||||
'bitmessagesettings', 'numberofnullbytesonaddress')
|
||||
except:
|
||||
if eighteenByteRipe:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 2
|
||||
else:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 1 # the default
|
||||
if queueValue[0] == 'createChan':
|
||||
command, addressVersionNumber, streamNumber, label, deterministicPassphrase = queueValue
|
||||
eighteenByteRipe = False
|
||||
|
@ -43,8 +35,24 @@ class addressGenerator(threading.Thread):
|
|||
numberOfNullBytesDemandedOnFrontOfRipeHash = 1
|
||||
elif len(queueValue) == 7:
|
||||
command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe = queueValue
|
||||
try:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = shared.config.getint(
|
||||
'bitmessagesettings', 'numberofnullbytesonaddress')
|
||||
except:
|
||||
if eighteenByteRipe:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 2
|
||||
else:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 1 # the default
|
||||
elif len(queueValue) == 9:
|
||||
command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes = queueValue
|
||||
try:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = shared.config.getint(
|
||||
'bitmessagesettings', 'numberofnullbytesonaddress')
|
||||
except:
|
||||
if eighteenByteRipe:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 2
|
||||
else:
|
||||
numberOfNullBytesDemandedOnFrontOfRipeHash = 1 # the default
|
||||
else:
|
||||
sys.stderr.write(
|
||||
'Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n' % repr(queueValue))
|
||||
|
|
Reference in New Issue
Block a user