summaryrefslogtreecommitdiff
path: root/src/ecdsa
diff options
context:
space:
mode:
authorKian Meng Ang <kianmeng.ang@gmail.com>2021-11-06 23:12:14 +0800
committerGitHub <noreply@github.com>2021-11-06 16:12:14 +0100
commitb3b27cd4811ce935e42bbcd251206ff2cb3b51b9 (patch)
treefe6da08cf8c0795181f7008a70b892343eed8f0b /src/ecdsa
parent357fb8471e3cfb4123b975446dba85a4621c97a5 (diff)
downloadecdsa-b3b27cd4811ce935e42bbcd251206ff2cb3b51b9.tar.gz
Fix typos (#266)
* Fix typos * Fix pylint e501
Diffstat (limited to 'src/ecdsa')
-rw-r--r--src/ecdsa/_version.py2
-rw-r--r--src/ecdsa/keys.py27
-rw-r--r--src/ecdsa/test_keys.py2
3 files changed, 15 insertions, 16 deletions
diff --git a/src/ecdsa/_version.py b/src/ecdsa/_version.py
index a72288a..2a12077 100644
--- a/src/ecdsa/_version.py
+++ b/src/ecdsa/_version.py
@@ -296,7 +296,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
# TAG-NUM-gHEX
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
if not mo:
- # unparseable. Maybe git-describe is misbehaving?
+ # unparsable. Maybe git-describe is misbehaving?
pieces["error"] = (
"unable to parse git-describe output: '%s'" % describe_out
)
diff --git a/src/ecdsa/keys.py b/src/ecdsa/keys.py
index 7b2a43b..4a673f6 100644
--- a/src/ecdsa/keys.py
+++ b/src/ecdsa/keys.py
@@ -57,13 +57,12 @@ Primary classes for performing signing and verification operations.
portable and cross-platform way.
bytes-like object
- All the types that implement the buffer protocol. That includes
- ``str`` (only on python2), ``bytes``, ``bytesarray``, ``array.array`
- and ``memoryview`` of those objects.
- Please note that ``array.array` serialisation (converting it to byte
- string) is endianess dependant! Signature computed over ``array.array``
- of integers on a big-endian system will not be verified on a
- little-endian system and vice-versa.
+ All the types that implement the buffer protocol. That includes ``str``
+ (only on python2), ``bytes``, ``bytesarray``, ``array.array` and
+ ``memoryview`` of those objects. Please note that ``array.array`
+ serialisation (converting it to byte string) is endianness dependent!
+ Signature computed over ``array.array`` of integers on a big-endian
+ system will not be verified on a little-endian system and vice-versa.
set-like object
All the types that support the ``in`` operator, like ``list``,
@@ -455,7 +454,7 @@ class VerifyingKey(object):
curve = Ed448
point_str, empty = der.remove_bitstring(point_str_bitstring, 0)
if empty:
- raise der.UnexpectedDER("trailing junk afer public key")
+ raise der.UnexpectedDER("trailing junk after public key")
return cls.from_string(point_str, curve, None)
if not oid_pk == oid_ecPublicKey:
raise der.UnexpectedDER(
@@ -701,7 +700,7 @@ class VerifyingKey(object):
as the `sigdecode` parameter.
:param signature: encoding of the signature
- :type signature: sigdecode method dependant
+ :type signature: sigdecode method dependent
:param data: data signed by the `signature`, will be hashed using
`hashfunc`, if specified, or default hash function
:type data: bytes like object
@@ -756,7 +755,7 @@ class VerifyingKey(object):
as the `sigdecode` parameter.
:param signature: encoding of the signature
- :type signature: sigdecode method dependant
+ :type signature: sigdecode method dependent
:param digest: raw hash value that the signature authenticates.
:type digest: bytes like object
:param sigdecode: Callable to define the way the signature needs to
@@ -1397,7 +1396,7 @@ class SigningKey(object):
:type extra_entropy: bytes like object
:return: encoded signature over `data`
- :rtype: bytes or sigencode function dependant type
+ :rtype: bytes or sigencode function dependent type
"""
hashfunc = hashfunc or self.default_hashfunc
data = normalise_bytes(data)
@@ -1458,7 +1457,7 @@ class SigningKey(object):
SHA-384 output using NIST256p or in similar situations.
:return: encoded signature for the `digest` hash
- :rtype: bytes or sigencode function dependant type
+ :rtype: bytes or sigencode function dependent type
"""
if isinstance(self.curve.curve, CurveEdTw):
raise ValueError("Method unsupported for Edwards curves")
@@ -1559,7 +1558,7 @@ class SigningKey(object):
:func:`~SigningKey.sign_deterministic` in such case.
:return: encoded signature of the hash of `data`
- :rtype: bytes or sigencode function dependant type
+ :rtype: bytes or sigencode function dependent type
"""
hashfunc = hashfunc or self.default_hashfunc
data = normalise_bytes(data)
@@ -1613,7 +1612,7 @@ class SigningKey(object):
:func:`~SigningKey.sign_digest_deterministic` in such case.
:return: encoded signature for the `digest` hash
- :rtype: bytes or sigencode function dependant type
+ :rtype: bytes or sigencode function dependent type
"""
if isinstance(self.curve.curve, CurveEdTw):
raise ValueError("Method unsupported for Edwards curves")
diff --git a/src/ecdsa/test_keys.py b/src/ecdsa/test_keys.py
index 7293b97..564f312 100644
--- a/src/ecdsa/test_keys.py
+++ b/src/ecdsa/test_keys.py
@@ -311,7 +311,7 @@ class TestVerifyingKeyFromDer(unittest.TestCase):
with self.assertRaises(UnexpectedDER) as e:
VerifyingKey.from_der(der_str)
- self.assertIn("trailing junk afer public key", str(e.exception))
+ self.assertIn("trailing junk after public key", str(e.exception))
def test_edwards_from_public_key_recovery(self):
with self.assertRaises(ValueError) as e: