Commit Graph

3 Commits

Author SHA1 Message Date
Jack Grigg 281b51e567
Raise the 90-character limit on Bech32 encodings
Regtest addresses are 91 characters, and ZIP 32's Bech32 encoding will
be significantly longer.
2018-07-30 16:01:22 +01:00
Jack Grigg c8511dfc07
Fix bech32::Encode() error handling
Previously, an input with invalid characters would result in out-of-bounds
reads, potentially exposing up to 224 bytes of memory following the location of
the CHARSET constant. This commit fixes the function to return an empty string,
which is what was originally documented as happening.
2018-06-07 17:19:44 +12:00
Pieter Wuille 10e5357e8b
Import Bech32 C++ reference code & tests
This includes a reformatted version of the Bech32 reference code
(see https://github.com/sipa/bech32/tree/master/ref/c%2B%2B), with
extra documentation.
2018-05-04 10:27:11 +01:00