summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/_secrets/crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/leap/soledad/client/_secrets/crypto.py')
-rw-r--r--client/src/leap/soledad/client/_secrets/crypto.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/leap/soledad/client/_secrets/crypto.py b/client/src/leap/soledad/client/_secrets/crypto.py
index 02d7dc02..fa7aaca0 100644
--- a/client/src/leap/soledad/client/_secrets/crypto.py
+++ b/client/src/leap/soledad/client/_secrets/crypto.py
@@ -34,11 +34,12 @@ class SecretsCrypto(object):
VERSION = 2
- def __init__(self, get_pass):
- self._get_pass = get_pass
+ def __init__(self, soledad):
+ self._soledad = soledad
def _get_key(self, salt):
- key = scrypt.hash(self._get_pass(), salt, buflen=32)
+ passphrase = self._soledad.passphrase.encode('utf8')
+ key = scrypt.hash(passphrase, salt, buflen=32)
return key
#