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

Function bech32_hrp_expand

bitcoin/segwit_addr.py:38–40  ·  view source on GitHub ↗

Expand the HRP into values for checksum computation.

(hrp)

Source from the content-addressed store, hash-verified

36
37
38def bech32_hrp_expand(hrp):
39 """Expand the HRP into values for checksum computation."""
40 return [ord(x) >> 5 for x in hrp] + [0] + [ord(x) & 31 for x in hrp]
41
42
43def bech32_verify_checksum(hrp, data):

Callers 2

bech32_verify_checksumFunction · 0.85
bech32_create_checksumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected