summaryrefslogtreecommitdiff
path: root/soledad/src/leap/soledad/target.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-06-09 15:17:51 -0300
committerdrebs <drebs@leap.se>2013-08-14 08:14:54 -0300
commit26d5b4f30aff0bb3435b516cde8d188c0af334e2 (patch)
tree4ba24bbb14fa3f4f220d0e0f39372a8aeeb8c9ac /soledad/src/leap/soledad/target.py
parent03b25515137012043121399f3b8e155b80403621 (diff)
Use pycryptopp for symmetric encryption.
Diffstat (limited to 'soledad/src/leap/soledad/target.py')
-rw-r--r--soledad/src/leap/soledad/target.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/soledad/src/leap/soledad/target.py b/soledad/src/leap/soledad/target.py
index 9fac9f54..cad51b74 100644
--- a/soledad/src/leap/soledad/target.py
+++ b/soledad/src/leap/soledad/target.py
@@ -168,7 +168,7 @@ def encrypt_doc(crypto, doc):
soledad_assert(doc.is_tombstone() is False)
# encrypt content using AES-256 CTR mode
iv, ciphertext = crypto.encrypt_sym(
- doc.get_json(),
+ str(doc.get_json()), # encryption/decryption routines expect str
crypto.doc_passphrase(doc.doc_id),
method=EncryptionMethods.AES_256_CTR)
# Return a representation for the encrypted content. In the following, we