Documentation ¶
Index ¶
- Constants
- Variables
- func EntropyWithCS(sz int) ([]byte, int, error)
- func ExtractChunk(buf []byte, i int) int
- func Mnemonics(sz int, dict []string) (string, error)
- func Seed(sz int, extra string) (string, []byte, []byte, error)
- func SeedFromMnemonics(mnemo, extra string) ([]byte, []byte, error)
- func SeedFromSaltMnemonics(mnemo, extra string, salt []byte) []byte
Constants ¶
View Source
const ( EntMultiplicity = 32 ENT32 = 32 ENT64 = ENT32 + EntMultiplicity ENT96 = ENT64 + EntMultiplicity ENT128 = ENT96 + EntMultiplicity ENT160 = ENT128 + EntMultiplicity ENT192 = ENT160 + EntMultiplicity ENT224 = ENT192 + EntMultiplicity ENT256 = ENT224 + EntMultiplicity )
Base entropy sizes.
View Source
const ( // DictBitsSize - dict len in bits DictBitsSize = 11 // bits // DictLen - dict len in words. DictLen = (1 << DictBitsSize) - 1 )
View Source
const ( DefaultArgon2Times = 1 DefaultArgon2Mem = 64 * 1024 DefaultArgon2Threads = 4 DefaultArgon2SaltLen = 16 // bytes )
Argon2 constants.
Variables ¶
View Source
var ( // ErrDictIndexTooBig - big dict index (>2047). ErrDictIndexTooBig = errors.New("dict index too big") // ErrUnsupportedEntropySize - unsupported entropy size. ErrUnsupportedEntropySize = errors.New("usuported entropy size") )
Functions ¶
func EntropyWithCS ¶
EntropyWithCS - make entropy, and append control sum as bip39.
func ExtractChunk ¶
ExtractChunk - extract DictBitSize chunk at a position in byte slice.
func SeedFromMnemonics ¶
SeedFromMnemonics - generate seed from given mnemonics.
func SeedFromSaltMnemonics ¶
SeedFromSaltMnemonics - generate seed from given mnemonics and salt.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.