py-libp2p/libp2p/pubsub/validators.py
2019-10-24 20:10:45 +02:00

11 lines
354 B
Python

# FIXME: Replace the type of `pubkey` with a custom type `Pubkey`
def signature_validator(pubkey: bytes, msg: bytes) -> bool:
"""
Verify the message against the given public key.
:param pubkey: the public key which signs the message.
:param msg: the message signed.
"""
# TODO: Implement the signature validation
return True