py-libp2p/libp2p/pubsub/validators.py

10 lines
353 B
Python
Raw Normal View History

2019-08-04 18:13:23 +08:00
# 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