dcrd/bech32
Dave Collins 3cfb088078
bech32: Add base256 conversion convenience funcs.
Since bech32 itself works with data encoded with 5 bits per byte (aka
base32) padded out to the nearest byte boundary, the existing functions
for Encode and Decode accept and return data encoded that way.

However, the most common way to use bech32 is to encode data that is
already encoded with 8 bits per byte (aka base256) without padding which
means it is up to the caller to use the ConvertBits function properly to
convert between the two encodings.

Consequently, this introduces two convenience functions for working
directly with base256-encoded data named EncodeFromBase256 and
DecodeToBase256 along with a full set of tests to ensure they work
expected.
2019-12-27 17:48:46 -06:00
..
bech32_test.go bech32: Add base256 conversion convenience funcs. 2019-12-27 17:48:46 -06:00
bech32.go bech32: Add base256 conversion convenience funcs. 2019-12-27 17:48:46 -06:00
doc.go bech32: Initial Version 2019-03-19 12:06:47 -03:00
error.go bech32: Initial Version 2019-03-19 12:06:47 -03:00
example_test.go bech32: Ensure HRP is lowercase when encoding. 2019-12-27 13:03:47 -06:00
go.mod bech32: Initial Version 2019-03-19 12:06:47 -03:00
README.md build: Replace TravisCI with CI via Github actions. 2019-09-20 19:59:04 -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/decred/dcrd/bech32

Examples

License

Package bech32 is licensed under the copyfree ISC License.