diff --git a/cmd/keygen.go b/cmd/keygen.go index 9a4faa940..527a7ca3d 100644 --- a/cmd/keygen.go +++ b/cmd/keygen.go @@ -13,9 +13,9 @@ func newKeygenCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobr cmd := ctl.NewKeygenCommand(stdin, stdout, stderr) ccmd := &cobra.Command{ Use: "keygen", - Short: "Generate keys for authentication.", + Short: "Generate secret key for authentication.", Long: ` -Generate hash and block keys to configure FeatureBase for Authentication. +Generate secret key to configure FeatureBase for Authentication. `, RunE: func(c *cobra.Command, args []string) error { return cmd.Run(context.Background()) @@ -23,6 +23,6 @@ Generate hash and block keys to configure FeatureBase for Authentication. } flags := ccmd.Flags() - flags.IntVarP(&cmd.KeyLength, "length", "l", 32, "length of keys to produce") + flags.IntVarP(&cmd.KeyLength, "length", "l", 32, "length of the key to produce") return ccmd } diff --git a/ctl/keygen.go b/ctl/keygen.go index 06cc797ad..dc0d4aa36 100644 --- a/ctl/keygen.go +++ b/ctl/keygen.go @@ -10,7 +10,7 @@ import ( pilosa "github.com/molecula/featurebase/v2" ) -// Keygen represents a command for generating crytographic keys. +// Keygen represents a command for generating a crytographic key. type KeygenCommand struct { CmdIO *pilosa.CmdIO KeyLength int @@ -23,9 +23,8 @@ func NewKeygenCommand(stdin io.Reader, stdout, stderr io.Writer) *KeygenCommand } } -// Run keys to use for authentication . +// Run keygen to obtain key to use for authentication . func (kg *KeygenCommand) Run(_ context.Context) error { - fmt.Printf("hash-key = \"%+x\"\n", securecookie.GenerateRandomKey(kg.KeyLength)) - fmt.Printf("block-key = \"%+x\"\n", securecookie.GenerateRandomKey(kg.KeyLength)) + fmt.Printf("secret-key = \"%+x\"\n", securecookie.GenerateRandomKey(kg.KeyLength)) return nil }