mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-21 23:48:12 -07:00
Restructed to Identity
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# from FPE import FlexPE
|
||||
from FPE import *
|
||||
# from FPE import Destination
|
||||
import os
|
||||
import time
|
||||
|
||||
def testCallback(message, receiver):
|
||||
@@ -11,17 +12,20 @@ def testCallback(message, receiver):
|
||||
print("----------")
|
||||
|
||||
|
||||
#fpe = FlexPE(config=os.path.expanduser("~")+"/.flexpe/config.test")
|
||||
fpe = FlexPE()
|
||||
d1=Destination(Destination.IN, Destination.SINGLE, "messenger", "markqvist")
|
||||
d1.createKey()
|
||||
identity = Identity()
|
||||
|
||||
d1=Destination(identity, Destination.IN, Destination.SINGLE, "messenger", "user")
|
||||
d1.setCallback(testCallback)
|
||||
|
||||
d2=Destination(Destination.IN, Destination.PLAIN, "plainchat", "markqvist")
|
||||
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.pub
|
||||
print d1.identity.pub
|
||||
print "---"
|
||||
print
|
||||
|
||||
@@ -32,7 +36,7 @@ for x in range(300):
|
||||
msg += "a"
|
||||
signed = d1.sign(msg)
|
||||
sl = len(signed)
|
||||
pl = len(d1.pub_bytes)
|
||||
pl = len(d1.identity.pub_bytes)
|
||||
print("Signature length is "+str(sl))
|
||||
print("Minimum announce is "+str(pl+sl+8))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user