summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-01-14 17:14:35 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-01-14 17:14:35 -0300
commitab2fb69e74464d5424d7e3429d4e787586cd00e8 (patch)
tree9669414250ac38fe5812219c691700d0920ff35b /service/pixelated/adapter
parent25aa934117802fab7a0c20f029d797602ebd46a8 (diff)
for #227, MAC on encrypted storage
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r--service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py b/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py
index d2d6f416..05d32779 100644
--- a/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py
+++ b/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py
@@ -25,7 +25,7 @@ class SoledadSearchIndexMasterkeyRetrievalMixin(SoledadDbFacadeMixin, object):
index_key_doc = result[0] if result else None
if not index_key_doc:
- new_index_key = os.urandom(32)
+ new_index_key = os.urandom(64) # 32 for encryption, 32 for hmac
self.create_doc(dict(type='index_key', value=base64.encodestring(new_index_key)))
return new_index_key
return base64.decodestring(index_key_doc.content['value'])