diff options
Diffstat (limited to 'src/cryptography/hazmat/primitives/kdf/scrypt.py')
-rw-r--r-- | src/cryptography/hazmat/primitives/kdf/scrypt.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/primitives/kdf/scrypt.py b/src/cryptography/hazmat/primitives/kdf/scrypt.py index 20935409..77dcf9ab 100644 --- a/src/cryptography/hazmat/primitives/kdf/scrypt.py +++ b/src/cryptography/hazmat/primitives/kdf/scrypt.py @@ -4,6 +4,8 @@ from __future__ import absolute_import, division, print_function +import sys + from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, InvalidKey, UnsupportedAlgorithm, _Reasons @@ -13,6 +15,11 @@ from cryptography.hazmat.primitives import constant_time from cryptography.hazmat.primitives.kdf import KeyDerivationFunction +# This is used by the scrypt tests to skip tests that require more memory +# than the MEM_LIMIT +_MEM_LIMIT = sys.maxsize // 2 + + @utils.register_interface(KeyDerivationFunction) class Scrypt(object): def __init__(self, salt, length, n, r, p, backend): |