Yup, `verify` should raise an exception.


On Wed, Feb 12, 2014 at 7:39 AM, Alex Stapleton <notifications@github.com>wrote:

> In docs/hazmat/oath/hotp.rst:
>
> > +    :param secret: Secret key as ``bytes``.
> > +    :param length: Length of generated one time password as ``int``.
> > +    :param backend: A
> > +        :class:`~cryptography.hazmat.backends.interfaces.
> HMACBackend`
> > +        provider.
> > +
> > +    .. method:: generate(counter)
> > +
> > +        :param int counter: The counter value used to generate the one time password.
> > +        :return: A one time password value.
> > +
> > +    .. method:: verify(hotp, counter)
> > +
> > +        :param bytes hotp: The one time password value to validate.
> > +        :param bytes counter: The counter value to validate against.
> > +        :return: ``True`` if the one time password value is valid. ``False`` if otherwise.
>
> I think normally we raise an exception if verify fails?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/598/files#r9671631>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084