Explorar o código

Tor's symmetric encryption doesn't have space overhead

so reflect that in EncryptedCell.size()
Ian Goldberg %!s(int64=4) %!d(string=hai) anos
pai
achega
cce3c9534e
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      relay.py

+ 4 - 0
relay.py

@@ -117,6 +117,10 @@ class EncryptedCell(RelayCell):
             raise ValueError("EncryptedCell key mismatch")
         return self.plaintext
 
+    def size(self):
+        # Current Tor actually has no overhead for encryption
+        return self.plaintext.size()
+
 
 class RelayFallbackTerminationError(Exception):
     """An exception raised when someone tries to terminate a fallback