rand

package
v0.0.0-...-05508b9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// int8 类型
	KeyLengthInt8 = 8

	// int16 类型
	KeyLengthInt16 = 16

	// int32 类型
	KeyLengthInt32 = 32

	// int64 类型
	KeyLengthInt64 = 64
)

定义不同int类型对应的key length

View Source
const (
	// 安全强度低
	KeyStrengthEasy = iota

	// 安全强度中
	KeyStrengthMiddle

	// 安全强度高
	KeyStrengthHard
)

Variables

View Source
var (
	// 熵的长度不在 [128, 256]以内或者长度不是32的倍数
	ErrInvalidEntropyLength = errors.New("Entropy length must within [128, 256] and be multiples of 32")

	// 助记词的强度暂未被支持
	// Strength required for generating Mnemonic not supported yet.
	ErrStrengthNotSupported = fmt.Errorf("This strength has not been supported yet.")
)

Functions

func GenerateSeedWithStrengthAndKeyLen

func GenerateSeedWithStrengthAndKeyLen(strength int, keyLength int) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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