walletseed

package
v0.0.0-...-516309f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinEntBytes       = uint(16)
	MaxEntBytes       = uint(32)
	RecommendedEntLen = uint(32)
	ErrInvalidEntLen  = fmt.Errorf("entropy length must be between %d and %d bits", MinEntBytes*8, MaxEntBytes*8)
)

Functions

func CheckSum

func CheckSum(ent []byte) []byte

CheckSum returns a slice of bits from the given entropy

func CheckSummed

func CheckSummed(ent []byte) []byte

CheckSummed returns a bit slice of entropy with an appended check sum

func DecodeMnemonicSlice

func DecodeMnemonicSlice(input []string, password string) ([]byte, error)

DecodeMnemonicSlice decodes a seed in mnemonic word list encoding back into its binary form.

func DecodeUserInput

func DecodeUserInput(input, password string) ([]byte, error)

DecodeUserInput decodes a seed in either hexadecimal or mnemonic word list encoding back into its binary form.

func EncodeMnemonic

func EncodeMnemonic(ent []byte) (string, error)

EncodeMnemonic encodes a entropy as a mnemonic word list separated by spaces.

func EncodeMnemonicSlice

func EncodeMnemonicSlice(ent []byte) ([]string, error)

EncodeMnemonicSlice encodes a entropy as a mnemonic word list.

func GenerateRandomEntropy

func GenerateRandomEntropy(size uint) ([]byte, error)

GenerateRandomEntropy returns a new seed created from a cryptographically-secure random source. If the seed size is unacceptable, ErrInvalidEntLen is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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