Skip to content

Commit 66a5150

Browse files
committed
document find_curve()
1 parent 2d5acf3 commit 66a5150

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ecdsa/curves.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,16 @@ def from_pem(cls, string, valid_encodings=None):
470470

471471

472472
def find_curve(oid_curve):
473+
"""Select a curve based on its OID
474+
475+
:param tuple[int,...] oid_curve: ASN.1 Object Identifier of the
476+
curve to return, like ``(1, 2, 840, 10045, 3, 1, 7)`` for ``NIST256p``.
477+
478+
:raises UnknownCurveError: When the oid doesn't match any of the supported
479+
curves
480+
481+
:rtype: ~ecdsa.curves.Curve
482+
"""
473483
for c in curves:
474484
if c.oid == oid_curve:
475485
return c

0 commit comments

Comments
 (0)