|
57 | 57 | portable and cross-platform way.
|
58 | 58 |
|
59 | 59 | bytes-like object
|
60 |
| - All the types that implement the buffer protocol. That includes |
61 |
| - ``str`` (only on python2), ``bytes``, ``bytesarray``, ``array.array` |
62 |
| - and ``memoryview`` of those objects. |
63 |
| - Please note that ``array.array` serialisation (converting it to byte |
64 |
| - string) is endianess dependant! Signature computed over ``array.array`` |
65 |
| - of integers on a big-endian system will not be verified on a |
66 |
| - little-endian system and vice-versa. |
| 60 | + All the types that implement the buffer protocol. That includes ``str`` |
| 61 | + (only on python2), ``bytes``, ``bytesarray``, ``array.array` and |
| 62 | + ``memoryview`` of those objects. Please note that ``array.array` |
| 63 | + serialisation (converting it to byte string) is endianness dependent! |
| 64 | + Signature computed over ``array.array`` of integers on a big-endian |
| 65 | + system will not be verified on a little-endian system and vice-versa. |
67 | 66 |
|
68 | 67 | set-like object
|
69 | 68 | All the types that support the ``in`` operator, like ``list``,
|
@@ -455,7 +454,7 @@ def from_der(
|
455 | 454 | curve = Ed448
|
456 | 455 | point_str, empty = der.remove_bitstring(point_str_bitstring, 0)
|
457 | 456 | if empty:
|
458 |
| - raise der.UnexpectedDER("trailing junk afer public key") |
| 457 | + raise der.UnexpectedDER("trailing junk after public key") |
459 | 458 | return cls.from_string(point_str, curve, None)
|
460 | 459 | if not oid_pk == oid_ecPublicKey:
|
461 | 460 | raise der.UnexpectedDER(
|
@@ -701,7 +700,7 @@ def verify(
|
701 | 700 | as the `sigdecode` parameter.
|
702 | 701 |
|
703 | 702 | :param signature: encoding of the signature
|
704 |
| - :type signature: sigdecode method dependant |
| 703 | + :type signature: sigdecode method dependent |
705 | 704 | :param data: data signed by the `signature`, will be hashed using
|
706 | 705 | `hashfunc`, if specified, or default hash function
|
707 | 706 | :type data: bytes like object
|
@@ -756,7 +755,7 @@ def verify_digest(
|
756 | 755 | as the `sigdecode` parameter.
|
757 | 756 |
|
758 | 757 | :param signature: encoding of the signature
|
759 |
| - :type signature: sigdecode method dependant |
| 758 | + :type signature: sigdecode method dependent |
760 | 759 | :param digest: raw hash value that the signature authenticates.
|
761 | 760 | :type digest: bytes like object
|
762 | 761 | :param sigdecode: Callable to define the way the signature needs to
|
@@ -1397,7 +1396,7 @@ def sign_deterministic(
|
1397 | 1396 | :type extra_entropy: bytes like object
|
1398 | 1397 |
|
1399 | 1398 | :return: encoded signature over `data`
|
1400 |
| - :rtype: bytes or sigencode function dependant type |
| 1399 | + :rtype: bytes or sigencode function dependent type |
1401 | 1400 | """
|
1402 | 1401 | hashfunc = hashfunc or self.default_hashfunc
|
1403 | 1402 | data = normalise_bytes(data)
|
@@ -1458,7 +1457,7 @@ def sign_digest_deterministic(
|
1458 | 1457 | SHA-384 output using NIST256p or in similar situations.
|
1459 | 1458 |
|
1460 | 1459 | :return: encoded signature for the `digest` hash
|
1461 |
| - :rtype: bytes or sigencode function dependant type |
| 1460 | + :rtype: bytes or sigencode function dependent type |
1462 | 1461 | """
|
1463 | 1462 | if isinstance(self.curve.curve, CurveEdTw):
|
1464 | 1463 | raise ValueError("Method unsupported for Edwards curves")
|
@@ -1559,7 +1558,7 @@ def sign(
|
1559 | 1558 | :func:`~SigningKey.sign_deterministic` in such case.
|
1560 | 1559 |
|
1561 | 1560 | :return: encoded signature of the hash of `data`
|
1562 |
| - :rtype: bytes or sigencode function dependant type |
| 1561 | + :rtype: bytes or sigencode function dependent type |
1563 | 1562 | """
|
1564 | 1563 | hashfunc = hashfunc or self.default_hashfunc
|
1565 | 1564 | data = normalise_bytes(data)
|
@@ -1613,7 +1612,7 @@ def sign_digest(
|
1613 | 1612 | :func:`~SigningKey.sign_digest_deterministic` in such case.
|
1614 | 1613 |
|
1615 | 1614 | :return: encoded signature for the `digest` hash
|
1616 |
| - :rtype: bytes or sigencode function dependant type |
| 1615 | + :rtype: bytes or sigencode function dependent type |
1617 | 1616 | """
|
1618 | 1617 | if isinstance(self.curve.curve, CurveEdTw):
|
1619 | 1618 | raise ValueError("Method unsupported for Edwards curves")
|
|
0 commit comments