diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-07-08 03:00:11 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-07-18 15:22:37 -0300 |
commit | 1b71b5c3f5df1c88f61ac2c57abe791f47027143 (patch) | |
tree | f2f23bd1cf27e44a8a766cb2e884346c9eb4af66 /src/leap/soledad/client | |
parent | 361eb8d7121cc8abb94d9fef784d5ff2b27722d0 (diff) |
[style] fix naming from review
Diffstat (limited to 'src/leap/soledad/client')
-rw-r--r-- | src/leap/soledad/client/_crypto.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/soledad/client/_crypto.py b/src/leap/soledad/client/_crypto.py index 998b70fa..c0d9dde9 100644 --- a/src/leap/soledad/client/_crypto.py +++ b/src/leap/soledad/client/_crypto.py @@ -33,7 +33,7 @@ Encryption ---------- IV = os.urandom(16) -PREAMBLE = BLOB_SIGNATURE_MAGIC, ENC_SCHEME, ENC_METHOD, time, IV, doc_id, rev, +PREAMBLE = MAGIC, ENC_SCHEME, ENC_METHOD, time, IV, doc_id, rev, and size. PREAMBLE = base64_encoded(PREAMBLE) @@ -90,7 +90,7 @@ from leap.soledad.common.preamble import InvalidPreambleException from leap.soledad.common.preamble import decode_preamble from leap.soledad.common.preamble import Preamble from leap.soledad.common.preamble import ENC_SCHEME, ENC_METHOD -from leap.soledad.common.preamble import BLOB_SIGNATURE_MAGIC +from leap.soledad.common.preamble import MAGIC SECRET_LENGTH = 64 @@ -383,7 +383,7 @@ class BlobDecryptor(object): except InvalidPreambleException as e: raise InvalidBlob(e) - if preamble.magic != BLOB_SIGNATURE_MAGIC: + if preamble.magic != MAGIC: raise InvalidBlob # TODO check timestamp. Just as a sanity check, but for instance # we can refuse to process something that is in the future or |