Skip to content

Commit 643f047

Browse files
committed
refine prompt
1 parent 9b50d05 commit 643f047

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

cmd/hppktool/cmd/encrypt.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import (
2020
var encryptCmd = &cobra.Command{
2121
Use: "encrypt",
2222
Short: "encrypts a message from standard input",
23-
Long: `the message will first be SHA256 hashed and then encrypted using HPPK, unless -raw is specified`,
23+
Long: `Encrypt a message with HPPK from standard input.
24+
The message is first SHA256 hashed, unless -raw is specified`,
2425
Run: func(cmd *cobra.Command, args []string) {
2526
silent, err := cmd.Flags().GetBool("silent")
2627
if err != nil {
@@ -115,6 +116,6 @@ func init() {
115116
// Cobra supports local flags which will only run when this command
116117
// is called directly, e.g.:
117118
// encryptCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
118-
encryptCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the hppk public key file")
119+
encryptCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the HPPK public key file")
119120
encryptCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes")
120121
}

cmd/hppktool/cmd/keygen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
var keygenCmd = &cobra.Command{
1818
Use: "keygen [directory]",
1919
Short: "generate a hppk private/public key pair",
20+
Long: "Generate a HPPK private/public key pair with given order and save them to the specified directory.",
2021
Example: "hppktool keygen /tmp\n" + "hppktool keygen /tmp --order 5",
2122
Args: cobra.ExactArgs(1),
2223
Run: func(cmd *cobra.Command, args []string) {

cmd/hppktool/cmd/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import (
1313
var rootCmd = &cobra.Command{
1414
Use: "hppktool",
1515
Short: "HPPK key management tool",
16-
Long: `Key generation, signing, verification, and secret encryption tool for HPPK.`,
16+
Long: `HPPK key management tool.
17+
HPPK key generation, signing, verification, and secret encryption.`,
1718
// Uncomment the following line if your bare application
1819
// has an action associated with it:
1920
// Run: func(cmd *cobra.Command, args []string) { },

cmd/hppktool/cmd/sign.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import (
2020
var signCmd = &cobra.Command{
2121
Use: "sign",
2222
Short: "sign a message from standard input",
23-
Long: `the message will first be SHA256 hashed and then encrypted using HPPK, unless -raw is specified`,
23+
Long: `Sign a message with HPPK from standard input with a given public key.
24+
The message is first SHA256 hashed, unless -raw is specified`,
2425
Run: func(cmd *cobra.Command, args []string) {
2526
silent, err := cmd.Flags().GetBool("silent")
2627
if err != nil {

cmd/hppktool/cmd/verify.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import (
1919
var verifyCmd = &cobra.Command{
2020
Use: "verify",
2121
Short: "verify a message from standard input",
22-
Long: `the message will first be SHA256 hashed and then be verified against using HPPK,unless -raw is specified`,
22+
Long: `Verify a HPPK signed message from standard input against the signature file and public key.
23+
The message is first SHA256 hashed, unless -raw is specified`,
2324
Run: func(cmd *cobra.Command, args []string) {
2425
silent, err := cmd.Flags().GetBool("silent")
2526
if err != nil {
@@ -128,7 +129,7 @@ func init() {
128129
// Cobra supports local flags which will only run when this command
129130
// is called directly, e.g.:
130131
// verifyCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
131-
verifyCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the hppk public key file")
132-
verifyCmd.Flags().String("sigfile", "./sigfile", "the signed signature file")
133-
verifyCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes")
132+
verifyCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the HPPK public key file to verify against.")
133+
verifyCmd.Flags().String("sigfile", "./sigfile", "the signed signature file.")
134+
verifyCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes.")
134135
}

0 commit comments

Comments
 (0)