Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BadSignatureError is now in nacl.exceptions not in ~nacl.signing.BadSignatureError #855

Open
Blackstareye opened this issue Feb 22, 2025 · 0 comments

Comments

@Blackstareye
Copy link

    def verify(
        self,
        smessage: bytes,
        signature: Optional[bytes] = None,
        encoder: encoding.Encoder = encoding.RawEncoder,
    ) -> bytes:
        """
        Verifies the signature of a signed message, returning the message
        if it has not been tampered with else raising
        :class:`~nacl.signing.BadSignatureError`.

        :param smessage: [:class:`bytes`] Either the original messaged or a
            signature and message concated together.
        :param signature: [:class:`bytes`] If an unsigned message is given for
            smessage then the detached signature must be provided.
        :param encoder: A class that is able to decode the secret message and
            signature.
        :rtype: :class:`bytes`
        """

:class:`~nacl.signing.BadSignatureError`.

I migrated from ed25519 used by keygen-sh to pynacl. While migrating I fixed the example so that it can be run with python 3.12~.
One thing that was missing was the BadSignatureError.

I looked that up and saw that it is now in

nacl.exceptions 

so I think the PyDoc needs to be adapted ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant