diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-01-13 17:28:14 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-01-13 17:28:14 -0300 |
commit | d53fb8b1ed1149653db57a02339e2ac00bec608c (patch) | |
tree | fd0193b0f5dd6c9eec4ffa099e213eb66b0ed468 /service/pixelated/adapter/soledad | |
parent | 314b27c271fe4dffb635ed2b4f003d40bb52c611 (diff) |
for #227, nacl -> SoledadCrypto, since its already present
Diffstat (limited to 'service/pixelated/adapter/soledad')
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py | 5 |
1 files changed, 2 insertions, 3 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 14472693..d2d6f416 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 @@ -14,8 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. from pixelated.adapter.soledad.soledad_facade_mixin import SoledadDbFacadeMixin -import nacl.secret -import nacl.utils +import os import base64 @@ -26,7 +25,7 @@ class SoledadSearchIndexMasterkeyRetrievalMixin(SoledadDbFacadeMixin, object): index_key_doc = result[0] if result else None if not index_key_doc: - new_index_key = nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE) + new_index_key = os.urandom(32) 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']) |