walletseed

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 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  = errors.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