chiark / gitweb /
ec.c, catacomb/__init__.py: Return tail from `parse'; provide `fromstring'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 24 Nov 2019 22:50:56 +0000 (22:50 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:49:31 +0000 (12:49 +0100)
commit96f89e4d236aa104c7fa03bfd3e4c564e7ab420d
tree4c5821af7462137b5def7dbaee13a2659122a50f
parentb1ddcca69421a27a09b2f5a5531f02936192736a
ec.c, catacomb/__init__.py: Return tail from `parse'; provide `fromstring'.

`ECCurve.parse' was inconsistent with the established nomenclature.
Generally, `parse' reads a prefix of some given string, returning the
denoted value and the unprocessed remainder of the input string;
`fromstring' does the same, except that it returns only the value, and
raises an exception if the remainder of the string is not only
whitespace.

Fix `ECCurve.parse' (which unfortunately is an incompatible change), and
add missing `fromstring' methods to `ECCurve' and `ECInfo'.
catacomb/__init__.py
ec.c
t/t-ec.py