Browse Source

update to moving the tag to the end...

irr_shared
John-Mark Gurney 3 years ago
parent
commit
bfe9840737
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lora.py

+ 2
- 2
lora.py View File

@@ -24,7 +24,7 @@ class LORANode(object):
self.st = Strobe(domain)

async def start(self):
msg = self.st.send_enc(b'reqreset' + os.urandom(16)) + \
msg = self.st.send_enc(os.urandom(16) + b'reqreset') + \
self.st.send_mac(8)

resp = await self.sd.sendtillrecv(msg, 1)
@@ -182,7 +182,7 @@ class TestLORANode(unittest.IsolatedAsyncioTestCase):
pkt = l.recv_enc(r[:-8])
l.recv_mac(r[-8:])

assert pkt.startswith(b'reqreset')
assert pkt.endswith(b'reqreset')

await self.put(l.send_enc(os.urandom(16)) +
l.send_mac(8))


Loading…
Cancel
Save