 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var Subcommands = cli.Commands{ { Name: "priv2id", Usage: "Reads a private key from STDIN, and returns a peer ID", Action: func(ctx *cli.Context) error { key, err := Priv2PeerID(os.Stdin) if err != nil { return err } fmt.Println(key) return nil }, }, { Name: "pub2id", Usage: "Reads a public key from STDIN, and returns a peer ID", Action: func(ctx *cli.Context) error { key, err := Pub2PeerID(os.Stdin) if err != nil { return err } fmt.Println(key) return nil }, }, { Name: "genkey", Usage: "Generates a private key", Action: func(ctx *cli.Context) error { buf := make([]byte, 32) if _, err := rand.Read(buf); err != nil { return fmt.Errorf("failed to get entropy: %w", err) } fmt.Println(hex.EncodeToString(buf)) return nil }, }, }
Functions ¶
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.