summaryrefslogtreecommitdiff
path: root/src/leap/soledad/crypto.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-17 09:53:37 -0300
committerdrebs <drebs@leap.se>2013-05-17 13:32:10 -0300
commit1a2a3c6d72e173425885caa2342138c4615a69a3 (patch)
tree6f3c8e7ce8b28f6f23097c7e8eab8f19c659dd98 /src/leap/soledad/crypto.py
parent3d5d817510c556d1f79fb58996997ef4ea629f83 (diff)
Use leap.common.crypto and AES-256 CTR for symmetric encryption.
Diffstat (limited to 'src/leap/soledad/crypto.py')
-rw-r--r--src/leap/soledad/crypto.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/soledad/crypto.py b/src/leap/soledad/crypto.py
index 6140ef31..d0e2c720 100644
--- a/src/leap/soledad/crypto.py
+++ b/src/leap/soledad/crypto.py
@@ -123,7 +123,7 @@ class SoledadCrypto(object):
return hmac.new(
self.secret[self.MAC_KEY_LENGTH:],
doc_id,
- hashlib.sha256).hexdigest()
+ hashlib.sha256).digest()
def doc_mac_key(self, doc_id):
"""
@@ -147,7 +147,7 @@ class SoledadCrypto(object):
return hmac.new(
self.secret[:self.MAC_KEY_LENGTH],
doc_id,
- hashlib.sha256).hexdigest()
+ hashlib.sha256).digest()
#
# secret setters/getters