aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/primitives/asymmetric/padding.py4
-rw-r--r--tests/hazmat/primitives/test_rsa.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/padding.py b/cryptography/hazmat/primitives/asymmetric/padding.py
index 62b32dd2..f1c886bf 100644
--- a/cryptography/hazmat/primitives/asymmetric/padding.py
+++ b/cryptography/hazmat/primitives/asymmetric/padding.py
@@ -33,7 +33,7 @@ class MGF1(object):
if not isinstance(algorithm, interfaces.HashAlgorithm):
raise TypeError("Expected instance of interfaces.HashAlgorithm.")
- self.algorithm = algorithm
+ self._algorithm = algorithm
if (not isinstance(salt_length, six.integer_types) and
not salt_length is self.MAX_LENGTH):
@@ -42,4 +42,4 @@ class MGF1(object):
if not salt_length is self.MAX_LENGTH and salt_length < 0:
raise ValueError("salt_length must be zero or greater")
- self.salt_length = salt_length
+ self._salt_length = salt_length
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py
index c4955478..114dc415 100644
--- a/tests/hazmat/primitives/test_rsa.py
+++ b/tests/hazmat/primitives/test_rsa.py
@@ -577,11 +577,11 @@ class TestMGF1(object):
algorithm = hashes.SHA1()
salt_length = algorithm.digest_size
mgf = padding.MGF1(algorithm, salt_length)
- assert mgf.algorithm == algorithm
- assert mgf.salt_length == salt_length
+ assert mgf._algorithm == algorithm
+ assert mgf._salt_length == salt_length
def test_valid_mgf1_parameters_maximum(self):
algorithm = hashes.SHA1()
mgf = padding.MGF1(algorithm, padding.MGF1.MAX_LENGTH)
- assert mgf.algorithm == algorithm
- assert mgf.salt_length == padding.MGF1.MAX_LENGTH
+ assert mgf._algorithm == algorithm
+ assert mgf._salt_length == padding.MGF1.MAX_LENGTH