Browse Source

Edited Docstring for Generator.equal_length()

christof 6 years ago
parent
commit
9c9849fbbd
1 changed files with 4 additions and 2 deletions
  1. 4 2
      code/ID2TLib/Generator.py

+ 4 - 2
code/ID2TLib/Generator.py

@@ -41,12 +41,14 @@ def add_padding(packet, bytes_padding:int = 0, user_padding:bool=True, rnd:bool
 def equal_length(list_of_packets:list, length:int = 0, padding:int = 0, force_len:bool = False):
     '''
     Equals the length of all packets of a given list of packets to the given length. If the given length is smaller than the largest
-    packet, all the other packets are extended to the largest packet's length. Add additional padding
+    packet, all the other packets are extended to the largest packet's length. Adds additional padding
     afterwards to create realism.
-    :param list_of_packets: The given set of packet.
+    :param list_of_packets: The given list of packet.
     :param length: The length each packet should have. Can be redundant, if the largest packet has more bytes
     :param force_len: if true, all packets are forced to take on the length of param length
     than length.
+    :param padding: The amount of bytes that can be appended at most by the second add, that creates realism.
+    (The called function will randomly chose a value between zero and padding.)
     :return: The list of extended packets.
     '''
     if not force_len: