MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / VerifyMessage

Function VerifyMessage

bitcoin/signmessage.py:20–26  ·  view source on GitHub ↗
(address, message, sig)

Source from the content-addressed store, hash-verified

18
19
20def VerifyMessage(address, message, sig):
21 sig = base64.b64decode(sig)
22 hash = message.GetHash()
23
24 pubkey = CPubKey.recover_compact(hash, sig)
25
26 return str(P2PKHBitcoinAddress.from_pubkey(pubkey)) == str(address)
27
28
29def SignMessage(key, message):

Callers 5

print_verboseFunction · 0.90

Calls 3

recover_compactMethod · 0.80
from_pubkeyMethod · 0.80
GetHashMethod · 0.45