summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-03-29 18:06:18 -0300
committerdrebs <drebs@leap.se>2017-04-04 18:27:40 +0200
commit5202f9f850501aeec2289416147a49706e86be1f (patch)
tree016cc3e1b06250a7152073ddb9a7e1d49b690760 /client/src/leap/soledad
parenta3532005c19c9ce7a726c9aeb924745589b6b230 (diff)
[docs] add docstrings to _get_rounded_size
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/_crypto.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/_crypto.py b/client/src/leap/soledad/client/_crypto.py
index 700449bb..868fcd0d 100644
--- a/client/src/leap/soledad/client/_crypto.py
+++ b/client/src/leap/soledad/client/_crypto.py
@@ -259,6 +259,10 @@ class BlobEncryptor(object):
self._aes.authenticate(self._encode_preamble())
def _get_rounded_size(self, fd):
+ """
+ Returns a rounded value in order to minimize information leaks due to
+ the original size being exposed.
+ """
fd.seek(0, os.SEEK_END)
size = _ceiling(fd.tell())
fd.seek(0)