Open
Description
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`
"""
Line 107 in 9ffa598
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
Labels
No labels