mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Add validate_msg and test
This commit is contained in:
9
libp2p/pubsub/validators.py
Normal file
9
libp2p/pubsub/validators.py
Normal file
@ -0,0 +1,9 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user