lbcutil/bech32
Anirudha Bose f281d151bb bech32: back port improvements from decred/dcrd@9b88dd0
This commit brings a host of improvements to the bech32 package. The
public interface of the package remains unchanged.

Summary of changes:
* Improved error handling using dedicated error types. Programmatically
  detect if the errors produced are the expected ones.
* Improve test coverage to test more corner cases. Added test vectors
  from Bitcoin Core.
* Add a benchmark for a full encode/decode cycle of a bech32 string.
* Add a new function DecodeNoLimit, for decoding large bech32 encoded
  strings. It does NOT validate against the BIP-173 maximum length
  allowed for bech32 strings.
* Automatically convert the HRP to lowercase in Encode function.
* Improve performance of encode/decode functions by using
  strings.Builder.
* Improve memory allocation in ConvertBits function.
* Updated documentation.

Credits: @matheusd

Closes #152 and #168.
2020-12-01 09:42:36 -05:00
..
bech32.go bech32: back port improvements from decred/dcrd@9b88dd0 2020-12-01 09:42:36 -05:00
bech32_test.go bech32: back port improvements from decred/dcrd@9b88dd0 2020-12-01 09:42:36 -05:00
doc.go bech32: Add bech32 encoding package. 2017-07-25 22:14:01 -05:00
error.go bech32: back port improvements from decred/dcrd@9b88dd0 2020-12-01 09:42:36 -05:00
example_test.go bech32: Add bech32 encoding package. 2017-07-25 22:14:01 -05:00
README.md bech32: Add bech32 encoding package. 2017-07-25 22:14:01 -05:00

bech32

Build Status ISC License GoDoc

Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.

Test vectors from BIP 173 are added to ensure compatibility with the BIP.

Installation and Updating

$ go get -u github.com/btcsuite/btcutil/bech32

Examples

License

Package bech32 is licensed under the copyfree ISC License.