Skip to content

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

Open
@Blackstareye

Description

@Blackstareye
    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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions