Compute a Bech32 string given HRP and data values.
(hrp, data)
| 53 | |
| 54 | |
| 55 | def bech32_encode(hrp, data): |
| 56 | """Compute a Bech32 string given HRP and data values.""" |
| 57 | combined = data + bech32_create_checksum(hrp, data) |
| 58 | return hrp + '1' + ''.join([CHARSET[d] for d in combined]) |
| 59 | |
| 60 | |
| 61 | def bech32_decode(bech): |
no test coverage detected