diff --git a/AESFile/aesfile.py b/AESFile/aesfile.py index f628878..2de69cd 100644 --- a/AESFile/aesfile.py +++ b/AESFile/aesfile.py @@ -41,7 +41,7 @@ def decrypt_file(aes, input_handle, output_handle): last_byte = chunk[-1] while chunk and chunk[-1] == last_byte: chunk = chunk[:-1] - if bytes_read % bytestring.MIBIBYTE == 0: + if bytes_read % bytestring.MEBIBYTE == 0: print(bytestring.bytestring(bytes_read)) output_handle.write(chunk) @@ -59,7 +59,7 @@ def encrypt_file(aes, input_handle, output_handle): chunk += pad_byte * (BLOCK_SIZE - len(chunk)) done = True bytes_read += len(chunk) - if bytes_read % bytestring.MIBIBYTE == 0: + if bytes_read % bytestring.MEBIBYTE == 0: print(bytestring.bytestring(bytes_read)) chunk = aes.encrypt(chunk) output_handle.write(chunk) diff --git a/Piecewise/piecewise.py b/Piecewise/piecewise.py index 7bbd012..a4913c3 100644 --- a/Piecewise/piecewise.py +++ b/Piecewise/piecewise.py @@ -10,7 +10,7 @@ from voussoirkit import bytestring from voussoirkit import downloady from voussoirkit import pipeable -DEFAULT_PIECE_SIZE = bytestring.MIBIBYTE +DEFAULT_PIECE_SIZE = bytestring.MEBIBYTE DEFAULT_THREAD_COUNT = 10 def init(url, localname=None, piece_size=DEFAULT_PIECE_SIZE): diff --git a/SimpleServer/simpleserver.py b/SimpleServer/simpleserver.py index d9453f7..5eb3305 100644 --- a/SimpleServer/simpleserver.py +++ b/SimpleServer/simpleserver.py @@ -18,7 +18,7 @@ from voussoirkit import passwordy from voussoirkit import pathclass from voussoirkit import ratelimiter -CHUNK_SIZE = bytestring.MIBIBYTE +CHUNK_SIZE = bytestring.MEBIBYTE OPENDIR_TEMPLATE = ''' @@ -553,7 +553,7 @@ def main(argv): '--overall_ratelimit', '--overall-ratelimit', type=bytestring.parsebytes, - default=200*bytestring.MIBIBYTE, + default=200*bytestring.MEBIBYTE, help=''' The maximum bytes/sec of the server overall. ''', @@ -573,7 +573,7 @@ def main(argv): '--individual_ratelimit', '--individual-ratelimit', type=bytestring.parsebytes, - default=100*bytestring.MIBIBYTE, + default=100*bytestring.MEBIBYTE, help=''' The maximum bytes/sec for any single request. ''',