diff options
author | Hubert Kario <hkario@redhat.com> | 2022-06-10 11:49:23 +0200 |
---|---|---|
committer | Hubert Kario <hkario@redhat.com> | 2022-06-10 13:13:54 +0200 |
commit | 66a5150d7488c5a50b5ae692294629838d0e3ae6 (patch) | |
tree | 6ba7ab1f95af3bdced5e18d9d765e26a54ba5ea7 | |
parent | 2d5acf3dccc6d340fff8f2429a82b2a535109dfe (diff) | |
download | ecdsa-66a5150d7488c5a50b5ae692294629838d0e3ae6.tar.gz |
document find_curve()
-rw-r--r-- | src/ecdsa/curves.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ecdsa/curves.py b/src/ecdsa/curves.py index 191cfab..1119ee5 100644 --- a/src/ecdsa/curves.py +++ b/src/ecdsa/curves.py @@ -470,6 +470,16 @@ curves = [ 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 |