Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var (
	ErrInvalidKeyLength = errors.New("invalid key length")
)
    
      View Source
      
  var Randomness = rand.New(RandomnessSource{})
    Randomness contains an Rand instance of the previously defined RandomnessSource.
Functions ¶
func ParseEd25519PrivateKeyFromString ¶
func ParseEd25519PrivateKeyFromString(key string) (ed25519.PrivateKey, error)
ParseEd25519PrivateKeyFromString parses an ed25519 private key from a string.
Types ¶
type RandomnessSource ¶
type RandomnessSource struct{}
    RandomnessSource implements a cryptographically secure randomness source.
func (RandomnessSource) Int63 ¶
func (s RandomnessSource) Int63() int64
Int63 returns a non-negative random 63-bit integer as an int64.
func (RandomnessSource) Seed ¶
func (s RandomnessSource) Seed(int64)
Seed is usually used to initialize the generator to a deterministic state but we want real randomness.
func (RandomnessSource) Uint64 ¶
func (s RandomnessSource) Uint64() (v uint64)
Uint64 returns a random 64-bit value as a uint64.
 Click to show internal directories. 
   Click to hide internal directories.