Skip to content

Commit 0340782

Browse files
committed
refine msgtext
1 parent 643f047 commit 0340782

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

cmd/hppktool/cmd/encrypt.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
// encryptCmd represents the encrypt command
2020
var encryptCmd = &cobra.Command{
2121
Use: "encrypt",
22-
Short: "encrypts a message from standard input",
23-
Long: `Encrypt a message with HPPK from standard input.
24-
The message is first SHA256 hashed, unless -raw is specified`,
22+
Short: "Encrypts a message from standard input",
23+
Long: `Encrypt a message using HPPK from standard input.
24+
By default, the message is hashed with SHA256 before encryption, unless the -raw flag is specified.`,
2525
Run: func(cmd *cobra.Command, args []string) {
2626
silent, err := cmd.Flags().GetBool("silent")
2727
if err != nil {
@@ -117,5 +117,5 @@ func init() {
117117
// is called directly, e.g.:
118118
// encryptCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
119119
encryptCmd.Flags().StringP("pubkey", "p", "./id_hppk.pub", "the HPPK public key file")
120-
encryptCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes")
120+
encryptCmd.Flags().Bool("raw", false, "Encrypt the raw message without hashing. The message length must not exceed 256 bytes.")
121121
}

cmd/hppktool/cmd/keygen.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
// keygenCmd represents the keygen command
1717
var keygenCmd = &cobra.Command{
1818
Use: "keygen [directory]",
19-
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.",
19+
Short: "Generate an HPPK private/public key pair",
20+
Long: "Generate an HPPK private/public key pair with the specified order and save them to the specified directory.",
2121
Example: "hppktool keygen /tmp\n" + "hppktool keygen /tmp --order 5",
2222
Args: cobra.ExactArgs(1),
2323
Run: func(cmd *cobra.Command, args []string) {
@@ -99,5 +99,5 @@ func init() {
9999

100100
// Cobra supports local flags which will only run when this command
101101
// is called directly, e.g.:
102-
keygenCmd.Flags().IntP("order", "o", 5, "the order of the polynomial")
102+
keygenCmd.Flags().IntP("order", "o", 5, "The degree of the polynomial")
103103
}

cmd/hppktool/cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var rootCmd = &cobra.Command{
1414
Use: "hppktool",
1515
Short: "HPPK key management tool",
1616
Long: `HPPK key management tool.
17-
HPPK key generation, signing, verification, and secret encryption.`,
17+
Supports key generation, signing, verification, and secret encryption.`,
1818
// Uncomment the following line if your bare application
1919
// has an action associated with it:
2020
// Run: func(cmd *cobra.Command, args []string) { },
@@ -38,5 +38,5 @@ func init() {
3838

3939
// Cobra also supports local flags, which will only run
4040
// when this action is called directly.
41-
rootCmd.PersistentFlags().BoolP("silent", "s", false, "Suppress non-vital message")
41+
rootCmd.PersistentFlags().BoolP("silent", "s", false, "Suppress non-essential messages")
4242
}

cmd/hppktool/cmd/sign.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
// signCmd represents the sign command
2020
var signCmd = &cobra.Command{
2121
Use: "sign",
22-
Short: "sign a message from standard input",
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`,
22+
Short: "Sign a message from standard input",
23+
Long: `Sign a message using HPPK from standard input with the specified public key.
24+
By default, the message is hashed with SHA256 before signing, unless the -raw flag is specified.`,
2525
Run: func(cmd *cobra.Command, args []string) {
2626
silent, err := cmd.Flags().GetBool("silent")
2727
if err != nil {
@@ -117,6 +117,6 @@ func init() {
117117
// Cobra supports local flags which will only run when this command
118118
// is called directly, e.g.:
119119
// signCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
120-
signCmd.Flags().StringP("identity", "p", "./id_hppk", "the hppk private key file")
121-
signCmd.Flags().Bool("raw", false, "encrypt the raw message, the message length must not exceed 256 bytes")
120+
signCmd.Flags().StringP("identity", "p", "./id_hppk", "the HPPK private key file")
121+
signCmd.Flags().Bool("raw", false, "Sign the raw message without hashing. The message length must not exceed 256 bytes.")
122122
}

cmd/hppktool/cmd/verify.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
// verifyCmd represents the verify command
1919
var verifyCmd = &cobra.Command{
2020
Use: "verify",
21-
Short: "verify a message from standard input",
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`,
21+
Short: "Verify a message from standard input",
22+
Long: `Verify an HPPK-signed message from standard input against the provided signature file and public key.
23+
By default, the message is hashed with SHA256 before verification, unless the -raw flag is specified.`,
2424
Run: func(cmd *cobra.Command, args []string) {
2525
silent, err := cmd.Flags().GetBool("silent")
2626
if err != nil {
@@ -130,6 +130,6 @@ func init() {
130130
// is called directly, e.g.:
131131
// verifyCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
132132
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.")
133+
verifyCmd.Flags().String("sigfile", "./sigfile", "The generated signature file.")
134+
verifyCmd.Flags().Bool("raw", false, "Verify the raw message without hashing. The message length must not exceed 256 bytes.")
135135
}

0 commit comments

Comments
 (0)