From b5e1a45b3c85eca52c116b595f58a6eec5d9664a Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 18 Jul 2017 12:06:25 -0400 Subject: [style] pep8 --- src/leap/soledad/client/_scrypt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/leap/soledad/client/_scrypt.py b/src/leap/soledad/client/_scrypt.py index 674fabd7..c55c9e8f 100644 --- a/src/leap/soledad/client/_scrypt.py +++ b/src/leap/soledad/client/_scrypt.py @@ -24,10 +24,12 @@ try: except ImportError: OPENSSL_HAS_SCRYPT = False + def _fallback_hash(secret, salt, buflen=32): import scrypt return scrypt.hash(secret, salt, buflen=buflen) + if OPENSSL_HAS_SCRYPT: from cryptography.hazmat.primitives.kdf.scrypt import Scrypt @@ -35,7 +37,7 @@ if OPENSSL_HAS_SCRYPT: try: _hash = Scrypt( salt, buflen, 16384, 8, 1, backend).derive(secret) - except UnsupportedAlgorithm: + except UnsupportedAlgorithm: _hash = _fallback_hash(secret, salt, buflen) return _hash -- cgit v1.2.3