cmd: abstract getPassPhrase functions into one (#21219)

* [cmd] Abstract `getPassPhrase` functions into one.

* cmd/ethkey: fix compilation failure

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
This commit is contained in:
Binacs
2020-06-30 15:56:40 +08:00
committed by GitHub
parent c13df14581
commit dd91c7ce6a
6 changed files with 146 additions and 85 deletions

View File

@ -67,7 +67,7 @@ Change the password of a keyfile.`,
}
newPhrase = strings.TrimRight(string(content), "\r\n")
} else {
newPhrase = promptPassphrase(true)
newPhrase = utils.GetPassPhrase("", true)
}
// Encrypt the key with the new passphrase.