mnemonic

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 3 Imported by: 2

Documentation

Overview

Package mnemonic provides english mnemonic encodings wrapping the golang bip39 reference implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMnemonic

func DecodeMnemonic(mnemonic string) ([]byte, error)

DecodeMnemonic decodes a given mnemonic into a entropy (the original entropy)

func EncodeMnemonic

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

EncodeMnemonic encodes a given entropy into a BIP39-styled english mnemonic. Note that if you are using a password you should run this through pkbdf or similar, do not send the password to this directly.

func GenerateMnemonic

func GenerateMnemonic(rng csprng.Source, numBytes int) (string, error)

GenerateMnemonic uses a CSPRNG to geenerate entropy then returns the corresponding english mnemonic. numBytes must be divisble by 4 and between 16 and 32.

Types

This section is empty.

Jump to

Keyboard shortcuts

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