aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-05-18 15:31:56 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-05-23 21:28:56 +0100
commita264eccab51b57422b99bd12d58a3f2a3f15ac1c (patch)
tree8552a190f0d1115fb494b93c927790025d7b1635
parent81ce8ef0ad52edac1d252c9bc7485c79ba2fcec9 (diff)
downloadcryptography-a264eccab51b57422b99bd12d58a3f2a3f15ac1c.tar.gz
cryptography-a264eccab51b57422b99bd12d58a3f2a3f15ac1c.tar.bz2
cryptography-a264eccab51b57422b99bd12d58a3f2a3f15ac1c.zip
Rename private_key to private_value
-rw-r--r--cryptography/hazmat/primitives/asymmetric/ec.py12
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst6
-rw-r--r--tests/hazmat/primitives/test_ec.py2
3 files changed, 10 insertions, 10 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/ec.py b/cryptography/hazmat/primitives/asymmetric/ec.py
index 29ab67d5..1e49ad7b 100644
--- a/cryptography/hazmat/primitives/asymmetric/ec.py
+++ b/cryptography/hazmat/primitives/asymmetric/ec.py
@@ -47,9 +47,9 @@ class EllipticCurvePublicNumbers(object):
class EllipticCurvePrivateNumbers(object):
- def __init__(self, private_key, public_numbers):
- if not isinstance(private_key, six.integer_types):
- raise TypeError("private_key must be an integer.")
+ def __init__(self, private_value, public_numbers):
+ if not isinstance(private_value, six.integer_types):
+ raise TypeError("private_value must be an integer.")
if not isinstance(public_numbers, EllipticCurvePublicNumbers):
raise TypeError(
@@ -57,12 +57,12 @@ class EllipticCurvePrivateNumbers(object):
"instance."
)
- self._private_key = private_key
+ self._private_value = private_value
self._public_numbers = public_numbers
@property
- def private_key(self):
- return self._private_key
+ def private_value(self):
+ return self._private_value
@property
def public_numbers(self):
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index 4b0d30c5..f88b965a 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -6,7 +6,7 @@ Elliptic Curve
.. currentmodule:: cryptography.hazmat.primitives.asymmetric.ec
-.. class:: EllipticCurvePrivateNumbers(private_key, public_numbers)
+.. class:: EllipticCurvePrivateNumbers(private_value, public_numbers)
.. versionadded:: 0.5
@@ -19,11 +19,11 @@ Elliptic Curve
The :class:`EllipticCurvePublicNumbers` which makes up the EC public
key associated with this EC private key.
- .. attribute:: private_key
+ .. attribute:: private_value
:type: int
- The private key.
+ The private value.
.. class:: EllipticCurvePublicNumbers(x, y, curve)
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py
index 9b31a2a6..f61b4a9b 100644
--- a/tests/hazmat/primitives/test_ec.py
+++ b/tests/hazmat/primitives/test_ec.py
@@ -35,7 +35,7 @@ class TestECC(object):
)
)
- assert numbers.private_key == 1
+ assert numbers.private_value == 1
assert numbers.public_numbers.x == 2
assert numbers.public_numbers.y == 3
assert isinstance(numbers.public_numbers.curve, DummyCurve)