mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-27 10:08:10 -07:00
Implemented transport for links
This commit is contained in:
+3
-2
@@ -133,8 +133,6 @@ class Packet:
|
||||
raise IOError("Packet with header type 2 must have a transport ID")
|
||||
|
||||
|
||||
|
||||
|
||||
self.header += chr(self.context)
|
||||
|
||||
self.raw = self.header + self.ciphertext
|
||||
@@ -225,6 +223,9 @@ class Packet:
|
||||
def getHash(self):
|
||||
return RNS.Identity.fullHash(self.getHashablePart())
|
||||
|
||||
def getTruncatedHash(self):
|
||||
return RNS.Identity.truncatedHash(self.getHashablePart())
|
||||
|
||||
def getHashablePart(self):
|
||||
hashable_part = struct.pack("!B", struct.unpack("!B", self.raw[0])[0] & 0b00001111)
|
||||
if self.header_type == Packet.HEADER_2:
|
||||
|
||||
Reference in New Issue
Block a user