Documentation ¶
Index ¶
- Variables
- func CheckSum(ent []byte) []byte
- func CheckSummed(ent []byte) []byte
- func DecodeMnemonicSlice(input []string, password string) ([]byte, error)
- func DecodeUserInput(input, password string) ([]byte, error)
- func EncodeMnemonic(ent []byte) (string, error)
- func EncodeMnemonicSlice(ent []byte) ([]string, error)
- func GenerateRandomEntropy(size uint) ([]byte, error)
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 CheckSummed ¶
CheckSummed returns a bit slice of entropy with an appended check sum
func DecodeMnemonicSlice ¶
DecodeMnemonicSlice decodes a seed in mnemonic word list encoding back into its binary form.
func DecodeUserInput ¶
DecodeUserInput decodes a seed in either hexadecimal or mnemonic word list encoding back into its binary form.
func EncodeMnemonic ¶
EncodeMnemonic encodes a entropy as a mnemonic word list separated by spaces.
func EncodeMnemonicSlice ¶
EncodeMnemonicSlice encodes a entropy as a mnemonic word list.
func GenerateRandomEntropy ¶
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.
Click to show internal directories.
Click to hide internal directories.