b32

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const NdauAlphabet = "abcdefghijkmnpqrstuvwxyz23456789"

NdauAlphabet is the encoding alphabet we use for byte32 encoding It consists of the lowercase alphabet and digits, without l, 1, 0, and o. When decoding, we will accept either upper or lower case.

Variables

This section is empty.

Functions

func Check

func Check(b []byte, ckb []byte) bool

Check accepts an array of bytes and a 2-byte checksum and returns true if the checksum of b is equal to the value passed in.

func Checksum16

func Checksum16(b []byte) []byte

Checksum16 generates a 2-byte checksum of b.

func Checksum24

func Checksum24(buf []byte) []byte

Checksum24 generates a 3-byte checksum of buf.

func Decode

func Decode(s string) ([]byte, error)

Decode converts a string back to a byte stream; case is insignificant.

func Encode

func Encode(b []byte) string

Encode converts a byte stream into a base32 string

func Index

func Index(c string) int

Index looks up the value of a letter in the ndau encoding alphabet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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