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") // 随机熵的强度暂未被支持 ErrStrengthNotSupported = fmt.Errorf("strength required for generating Mnemonic has not been supported yet") )
Functions ¶
func GenerateEntropy ¶
GenerateEntropy 底层调用跟操作系统相关的函数(读取系统熵)来产生一些伪随机数, 对外建议管这个返回值叫做“熵”
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.