summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-07-08 05:44:31 -0300
committerdrebs <drebs@leap.se>2017-07-21 10:58:45 -0300
commiteb000dac7a66ea249adb8c9b7d154101b897311c (patch)
tree92e6e001ec2af2bdabfd79326081d0faaf08d30e
parent32a11abccb0a5090e9c1ad930ecd49ce18dc7bf8 (diff)
[refactor] creates a common.blobs with preamble
Refactor suggested from !105 review.
-rw-r--r--src/leap/soledad/client/_crypto.py10
-rw-r--r--src/leap/soledad/common/blobs/__init__.py0
-rw-r--r--src/leap/soledad/common/blobs/preamble.py (renamed from src/leap/soledad/common/preamble.py)0
-rw-r--r--src/leap/soledad/server/_incoming.py2
-rw-r--r--testing/tests/client/test_crypto.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/leap/soledad/client/_crypto.py b/src/leap/soledad/client/_crypto.py
index c0d9dde9..a0ec343c 100644
--- a/src/leap/soledad/client/_crypto.py
+++ b/src/leap/soledad/client/_crypto.py
@@ -86,11 +86,11 @@ from cryptography.hazmat.backends import default_backend
from zope.interface import implementer
-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 MAGIC
+from leap.soledad.common.blobs.preamble import InvalidPreambleException
+from leap.soledad.common.blobs.preamble import decode_preamble
+from leap.soledad.common.blobs.preamble import Preamble
+from leap.soledad.common.blobs.preamble import ENC_SCHEME, ENC_METHOD
+from leap.soledad.common.blobs.preamble import MAGIC
SECRET_LENGTH = 64
diff --git a/src/leap/soledad/common/blobs/__init__.py b/src/leap/soledad/common/blobs/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/leap/soledad/common/blobs/__init__.py
diff --git a/src/leap/soledad/common/preamble.py b/src/leap/soledad/common/blobs/preamble.py
index d4065c38..d4065c38 100644
--- a/src/leap/soledad/common/preamble.py
+++ b/src/leap/soledad/common/blobs/preamble.py
diff --git a/src/leap/soledad/server/_incoming.py b/src/leap/soledad/server/_incoming.py
index 71e71d7f..187b6973 100644
--- a/src/leap/soledad/server/_incoming.py
+++ b/src/leap/soledad/server/_incoming.py
@@ -27,7 +27,7 @@ from leap.soledad.common.document import ServerDocument
from leap.soledad.common.crypto import ENC_JSON_KEY
from leap.soledad.common.crypto import ENC_SCHEME_KEY
from leap.soledad.common.crypto import EncryptionSchemes
-from leap.soledad.common import preamble
+from leap.soledad.common.blobs import preamble
__all__ = ['IncomingResource']
diff --git a/testing/tests/client/test_crypto.py b/testing/tests/client/test_crypto.py
index 62a13df7..bbbc4a43 100644
--- a/testing/tests/client/test_crypto.py
+++ b/testing/tests/client/test_crypto.py
@@ -34,7 +34,7 @@ from leap.soledad.common.document import SoledadDocument
from test_soledad.util import BaseSoledadTest
from leap.soledad.client import _crypto
from leap.soledad.client import _scrypt
-from leap.soledad.common import preamble as _preamble
+from leap.soledad.common.blobs import preamble as _preamble
from twisted.trial import unittest
from twisted.internet import defer