aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethkey
diff options
context:
space:
mode:
authorSjonHortensius <SjonHortensius@users.noreply.github.com>2019-08-12 17:00:38 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-08-12 17:00:38 +0800
commit36994e4e0b2be1362f99048d08b907628088e2bb (patch)
tree2499ca40e033b681e05dc9de19420cddd6adf204 /cmd/ethkey
parentc9cdf144d55f6bbd75314e812eeefc18d7e8c40e (diff)
downloadgo-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar.gz
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar.bz2
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar.lz
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar.xz
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.tar.zst
go-tangerine-36994e4e0b2be1362f99048d08b907628088e2bb.zip
all: replace passPHRASE with passWORD in user interactions (#19932)
* Ref #19906 - replace passPHRASE with passWORD in any user interactions this skips doccomments and variablenames to minimize impact. It does however include a rename of the `ethkey` `changepassphrase` parameter * console: fix JavaScript error capitalization
Diffstat (limited to 'cmd/ethkey')
-rw-r--r--cmd/ethkey/README.md12
-rw-r--r--cmd/ethkey/changepassword.go (renamed from cmd/ethkey/changepassphrase.go)14
-rw-r--r--cmd/ethkey/main.go2
-rw-r--r--cmd/ethkey/message_test.go6
-rw-r--r--cmd/ethkey/utils.go12
5 files changed, 23 insertions, 23 deletions
diff --git a/cmd/ethkey/README.md b/cmd/ethkey/README.md
index 48d3c9e9b..bfddd1467 100644
--- a/cmd/ethkey/README.md
+++ b/cmd/ethkey/README.md
@@ -35,18 +35,18 @@ It is possible to refer to a file containing the message.
To sign a message contained in a file, use the --msgfile flag.
-### `ethkey changepassphrase <keyfile>`
+### `ethkey changepassword <keyfile>`
-Change the passphrase of a keyfile.
+Change the password of a keyfile.
use the `--newpasswordfile` to point to the new password file.
-## Passphrases
+## Passwords
For every command that uses a keyfile, you will be prompted to provide the
-passphrase for decrypting the keyfile. To avoid this message, it is possible
-to pass the passphrase by using the `--passwordfile` flag pointing to a file that
-contains the passphrase.
+password for decrypting the keyfile. To avoid this message, it is possible
+to pass the password by using the `--passwordfile` flag pointing to a file that
+contains the password.
## JSON
diff --git a/cmd/ethkey/changepassphrase.go b/cmd/ethkey/changepassword.go
index 5d8e8af64..5689c2661 100644
--- a/cmd/ethkey/changepassphrase.go
+++ b/cmd/ethkey/changepassword.go
@@ -28,15 +28,15 @@ import (
var newPassphraseFlag = cli.StringFlag{
Name: "newpasswordfile",
- Usage: "the file that contains the new passphrase for the keyfile",
+ Usage: "the file that contains the new password for the keyfile",
}
var commandChangePassphrase = cli.Command{
- Name: "changepassphrase",
- Usage: "change the passphrase on a keyfile",
+ Name: "changepassword",
+ Usage: "change the password on a keyfile",
ArgsUsage: "<keyfile>",
Description: `
-Change the passphrase of a keyfile.`,
+Change the password of a keyfile.`,
Flags: []cli.Flag{
passphraseFlag,
newPassphraseFlag,
@@ -58,12 +58,12 @@ Change the passphrase of a keyfile.`,
}
// Get a new passphrase.
- fmt.Println("Please provide a new passphrase")
+ fmt.Println("Please provide a new password")
var newPhrase string
if passFile := ctx.String(newPassphraseFlag.Name); passFile != "" {
content, err := ioutil.ReadFile(passFile)
if err != nil {
- utils.Fatalf("Failed to read new passphrase file '%s': %v", passFile, err)
+ utils.Fatalf("Failed to read new password file '%s': %v", passFile, err)
}
newPhrase = strings.TrimRight(string(content), "\r\n")
} else {
@@ -73,7 +73,7 @@ Change the passphrase of a keyfile.`,
// Encrypt the key with the new passphrase.
newJson, err := keystore.EncryptKey(key, newPhrase, keystore.StandardScryptN, keystore.StandardScryptP)
if err != nil {
- utils.Fatalf("Error encrypting with new passphrase: %v", err)
+ utils.Fatalf("Error encrypting with new password: %v", err)
}
// Then write the new keyfile in place of the old one.
diff --git a/cmd/ethkey/main.go b/cmd/ethkey/main.go
index a8399ad7c..5b545d5f9 100644
--- a/cmd/ethkey/main.go
+++ b/cmd/ethkey/main.go
@@ -49,7 +49,7 @@ func init() {
var (
passphraseFlag = cli.StringFlag{
Name: "passwordfile",
- Usage: "the file that contains the passphrase for the keyfile",
+ Usage: "the file that contains the password for the keyfile",
}
jsonFlag = cli.BoolFlag{
Name: "json",
diff --git a/cmd/ethkey/message_test.go b/cmd/ethkey/message_test.go
index 39352b1d2..e9e8eeeaf 100644
--- a/cmd/ethkey/message_test.go
+++ b/cmd/ethkey/message_test.go
@@ -37,8 +37,8 @@ func TestMessageSignVerify(t *testing.T) {
generate := runEthkey(t, "generate", keyfile)
generate.Expect(`
!! Unsupported terminal, password will be echoed.
-Passphrase: {{.InputLine "foobar"}}
-Repeat passphrase: {{.InputLine "foobar"}}
+Password: {{.InputLine "foobar"}}
+Repeat password: {{.InputLine "foobar"}}
`)
_, matches := generate.ExpectRegexp(`Address: (0x[0-9a-fA-F]{40})\n`)
address := matches[1]
@@ -48,7 +48,7 @@ Repeat passphrase: {{.InputLine "foobar"}}
sign := runEthkey(t, "signmessage", keyfile, message)
sign.Expect(`
!! Unsupported terminal, password will be echoed.
-Passphrase: {{.InputLine "foobar"}}
+Password: {{.InputLine "foobar"}}
`)
_, matches = sign.ExpectRegexp(`Signature: ([0-9a-f]+)\n`)
signature := matches[1]
diff --git a/cmd/ethkey/utils.go b/cmd/ethkey/utils.go
index 6f60ebaf1..c6cf5c25a 100644
--- a/cmd/ethkey/utils.go
+++ b/cmd/ethkey/utils.go
@@ -31,18 +31,18 @@ import (
// promptPassphrase prompts the user for a passphrase. Set confirmation to true
// to require the user to confirm the passphrase.
func promptPassphrase(confirmation bool) string {
- passphrase, err := console.Stdin.PromptPassword("Passphrase: ")
+ passphrase, err := console.Stdin.PromptPassword("Password: ")
if err != nil {
- utils.Fatalf("Failed to read passphrase: %v", err)
+ utils.Fatalf("Failed to read password: %v", err)
}
if confirmation {
- confirm, err := console.Stdin.PromptPassword("Repeat passphrase: ")
+ confirm, err := console.Stdin.PromptPassword("Repeat password: ")
if err != nil {
- utils.Fatalf("Failed to read passphrase confirmation: %v", err)
+ utils.Fatalf("Failed to read password confirmation: %v", err)
}
if passphrase != confirm {
- utils.Fatalf("Passphrases do not match")
+ utils.Fatalf("Passwords do not match")
}
}
@@ -58,7 +58,7 @@ func getPassphrase(ctx *cli.Context) string {
if passphraseFile != "" {
content, err := ioutil.ReadFile(passphraseFile)
if err != nil {
- utils.Fatalf("Failed to read passphrase file '%s': %v",
+ utils.Fatalf("Failed to read password file '%s': %v",
passphraseFile, err)
}
return strings.TrimRight(string(content), "\r\n")