mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-26 15:30:18 +00:00
Cleanup
This commit is contained in:
parent
07814919f2
commit
5f7694afdd
@ -15,11 +15,11 @@ from cryptography.hazmat.primitives.asymmetric import padding
|
|||||||
|
|
||||||
class Identity:
|
class Identity:
|
||||||
# Configure key size
|
# Configure key size
|
||||||
KEYSIZE = 1536;
|
KEYSIZE = 1536
|
||||||
DERKEYSIZE = 1808;
|
DERKEYSIZE = 1808
|
||||||
|
|
||||||
# Padding size, not configurable
|
# Padding size, not configurable
|
||||||
PADDINGSIZE= 336;
|
PADDINGSIZE= 336
|
||||||
|
|
||||||
# Storage
|
# Storage
|
||||||
known_destinations = {}
|
known_destinations = {}
|
||||||
|
@ -94,7 +94,7 @@ class Packet:
|
|||||||
def send(self):
|
def send(self):
|
||||||
if not self.sent:
|
if not self.sent:
|
||||||
self.pack()
|
self.pack()
|
||||||
RNS.log("Size: "+str(len(self.raw))+" header is "+str(len(self.header))+" payload is "+str(len(self.ciphertext)), RNS.LOG_DEBUG)
|
#RNS.log("Size: "+str(len(self.raw))+" header is "+str(len(self.header))+" payload is "+str(len(self.ciphertext)), RNS.LOG_DEBUG)
|
||||||
RNS.Transport.outbound(self.raw)
|
RNS.Transport.outbound(self.raw)
|
||||||
self.packet_hash = RNS.Identity.fullHash(self.raw)
|
self.packet_hash = RNS.Identity.fullHash(self.raw)
|
||||||
self.sent_at = time.time()
|
self.sent_at = time.time()
|
||||||
|
@ -17,7 +17,7 @@ class Transport:
|
|||||||
Transport.cacheRaw(raw)
|
Transport.cacheRaw(raw)
|
||||||
for interface in Transport.interfaces:
|
for interface in Transport.interfaces:
|
||||||
if interface.OUT:
|
if interface.OUT:
|
||||||
RNS.log("Transmitting via: "+str(interface), RNS.LOG_DEBUG)
|
RNS.log("Transmitting "+str(len(raw))+" bytes via: "+str(interface), RNS.LOG_DEBUG)
|
||||||
interface.processOutgoing(raw)
|
interface.processOutgoing(raw)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user