Documentation
¶
Index ¶
Constants ¶
View Source
const ( Seed = "key.seed" Pub = "key.pub" )
Variables ¶
View Source
var Cmd = &cli.Subcmd{ FlagSet: flag.NewFlagSet("init", flag.ExitOnError), Desc: "Generate ed25519 keypair (key.seed, key.pub) and exit", Run: func(fm fsdir.T) { pk, sk, err := ed25519.GenerateKey(nil) if err != nil { log.Fatal(err) } log.Printf("writing ed25519 private key seed to %s", fm.Path(Seed)) err = fm.Set(jsonb.B(sk.Seed()), Seed) if err != nil { log.Fatal(err) } err = fm.Chmod(0600, Seed) if err != nil { log.Fatal(err) } log.Printf("writing ed25519 public key to %s", fm.Path(Pub)) err = fm.Set(jsonb.PK(pk), Pub) if err != nil { log.Fatal(err) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.