Announce and validation

This commit is contained in:
Mark Qvist
2018-03-19 18:11:50 +01:00
parent 3ea36ff9b3
commit 82744fb9ed
6 changed files with 125 additions and 35 deletions
+2 -16
View File
@@ -19,30 +19,16 @@ identity = Identity()
d1=Destination(identity, Destination.IN, Destination.SINGLE, "messenger", "user")
d1.setCallback(testCallback)
d2=Destination(identity, Destination.IN, Destination.PLAIN, "messenger", "user")
d2.setCallback(testCallback)
# d2=Destination(identity, Destination.IN, Destination.PLAIN, "plainchat", "markqvist")
# d2.setCallback(testCallback)
#print identity.hexhash
#print d1.name
#print d1.hexhash
#print d1.identity.pub
#print "---"
#print
msg=""
for x in range(300):
msg += "a"
signed = d1.sign(msg)
sl = len(signed)
pl = len(d1.identity.pub_bytes)
#print("Signature length is "+str(sl))
#print("Minimum announce is "+str(pl+sl+8))
d1.announce()
p1=Packet(d1, msg)
p1.send()
#p1.send()
# p2=Packet(d2,"Test af msg")
# p2.send()