based32

package
v0.0.0-...-75b4458 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package based32 provides a simplified variant of the standard Bech32 human readable binary codec

This codec simplifies the padding algorithm compared to the Bech32 standard BIP 0173 by performing all of the check validation with the decoded bits instead of separating the pads of each segment.

The format will be entirely created by the use of the standard library base32, which may or may not result in the same thing (we are teaching Go here, not cryptocurrency, and the extra rules used by the Bech32 standard complicate this tutorial unnecessarily - and, Go Uber Alles :)

Index

Constants

This section is empty.

Variables

View Source
var Codec = makeCodec(
	"Base32Check",
	charset,
	"QNTRL",
)

Codec provides the encoder/decoder implementation created by makeCodec.

This variable is sometimes called a "Singleton" in other languages, and in Go it is a thing that should be avoided unless the value is not a constant and an initialization process is required.

Variable declarations like this are executed before init() functions and are for cases such as this, as the import of this package means the programmer intends to use this codec, usually, as otherwise they would be creating a new implementation from the struct type or for the interface.

In general, an init() function is better avoided, and singletons also, better avoided, unless it makes sense in the context of the package as this is this initialization adds to startup delay for an application, so consider carefully before using these or init().

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL