#There is another copy of this function in Bitmessagemain.py
defconvertIntToString(n):
@ -245,50 +245,37 @@ def addressStream(address):
if__name__=="__main__":
#Let's make a new Bitmessage address:
(pubkey,privkey)=rsa.newkeys(256)
printprivkey['n']
printprivkey['e']
printprivkey['d']
printprivkey['p']
printprivkey['q']
print'Let us make an address from scratch. Suppose we generate two random 32 byte values and call the first one the signing key and the second one the encryption key:'
print'Notice that they both begin with the \\x04 which specifies the encoding type. This prefix is not send over the wire. You must strip if off before you send your public key across the wire, and you must add it back when you receive a public key.'
#Cannot decode senderAddressVersion higher than 2. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.
return
readPosition+=sendersAddressVersionLength
@ -638,7 +637,7 @@ class receiveDataThread(QThread):
print'Time spent processing this interesting broadcast:',time.time()-self.messageProcessingStartTime
@ -977,7 +976,7 @@ class receiveDataThread(QThread):
print'Could not decrypt with any RSA keys if you have any.'
printLock.release()
infile.close()
outfile.close()
outfile.close()"""
#A msg message has a valid time and POW and requires processing. The recmsg function calls this one.
defprocessmsg(self,readPosition):
@ -1095,6 +1094,7 @@ class receiveDataThread(QThread):
sqlSubmitQueue.put(t)
sqlReturnQueue.get()
sqlLock.release()
workerQueue.put(('newpubkey',(sendersAddressVersionNumber,sendersStreamNumber,ripe.digest())))#This will check to see whether we happen to be awaiting this pubkey in order to send a message. If we are, it will do the POW and send it.
blockMessage=False#Gets set to True if the user shouldn't see the message according to black or white lists.
@ -1461,6 +1459,9 @@ class receiveDataThread(QThread):
ifaddressVersionNumber==0:
print'The addressVersionNumber of the pubkey request is zero. That doesn\'t make any sense. Ignoring it.'
return
elifaddressVersionNumber==1:
print'The addressVersionNumber of the pubkey request is 1 which isn\'t supported anymore. Ignoring it.'
return
elifaddressVersionNumber>2:
print'The addressVersionNumber of the pubkey request is too high. Can\'t understand. Ignoring it.'
return
@ -3011,7 +3012,7 @@ class addressGenerator(QThread):
reloadMyAddressHashes()
#This code which deals with old RSA addresses will soon be removed.
elifself.addressVersionNumber==1:
"""elif self.addressVersionNumber == 1:
statusbar='Generating new '+str(config.getint('bitmessagesettings','bitstrength'))+' bit RSA key. This takes a minute on average. If you want to generate multiple addresses now, you can; they will queue.'