Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The Default length in bytes for a seed DefaultSeedBytes = 32 // 256 bits // MinSeedBytes is the minimum number of bytes allowed for a seed MinSeedBytes = 16 // 128 bits // MaxSeedBytes is the maximum number of bytes allowed for a seed MaxSeedBytes = 256 // 1024 bits )
Variables ¶
View Source
var ( // ErrInvalidSeedLen describes an error in which the provided seed or // seed length is not in the allowed range. ErrInvalidSeedLen = fmt.Errorf("seed length must be between %d and %d "+ "bits", MinSeedBytes*8, MaxSeedBytes*8) )
Functions ¶
func GenerateSeed ¶
GenerateSeed returns a cryptographically secure random seed that can be used as the input for the further usage.
The length is in bytes and it must be between 16 and 256 (128 to 1024 bits). The default length is 32 (256 bits) as defined by the DefaultSeedLength constant.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.