Skip to content

Commit

Permalink
document find_curve()
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed Jun 10, 2022
1 parent 2d5acf3 commit 66a5150
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ecdsa/curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,16 @@ def from_pem(cls, string, valid_encodings=None):


def find_curve(oid_curve):
"""Select a curve based on its OID
:param tuple[int,...] oid_curve: ASN.1 Object Identifier of the
curve to return, like ``(1, 2, 840, 10045, 3, 1, 7)`` for ``NIST256p``.
:raises UnknownCurveError: When the oid doesn't match any of the supported
curves
:rtype: ~ecdsa.curves.Curve
"""
for c in curves:
if c.oid == oid_curve:
return c
Expand Down

0 comments on commit 66a5150

Please sign in to comment.