@@ -17,7 +17,7 @@ import (
17
17
"decred.org/dcrwallet/v2/errors"
18
18
"decred.org/dcrwallet/v2/walletseed"
19
19
"github.com/decred/dcrd/hdkeychain/v3"
20
- "golang.org/x/crypto/ssh/terminal "
20
+ "golang.org/x/term "
21
21
)
22
22
23
23
// ProvideSeed is used to prompt for the wallet seed which maybe required during
@@ -53,7 +53,7 @@ func ProvidePrivPassphrase() ([]byte, error) {
53
53
prompt := "Enter the private passphrase of your wallet: "
54
54
for {
55
55
fmt .Print (prompt )
56
- pass , err := terminal .ReadPassword (int (os .Stdin .Fd ()))
56
+ pass , err := term .ReadPassword (int (os .Stdin .Fd ()))
57
57
if err != nil {
58
58
return nil , err
59
59
}
@@ -125,8 +125,8 @@ func PassPrompt(reader *bufio.Reader, prefix string, confirm bool) ([]byte, erro
125
125
var pass []byte
126
126
var err error
127
127
fd := int (os .Stdin .Fd ())
128
- if terminal .IsTerminal (fd ) {
129
- pass , err = terminal .ReadPassword (fd )
128
+ if term .IsTerminal (fd ) {
129
+ pass , err = term .ReadPassword (fd )
130
130
} else {
131
131
pass , err = reader .ReadBytes ('\n' )
132
132
if errors .Is (err , io .EOF ) {
@@ -147,7 +147,7 @@ func PassPrompt(reader *bufio.Reader, prefix string, confirm bool) ([]byte, erro
147
147
}
148
148
149
149
fmt .Print ("Confirm passphrase: " )
150
- confirm , err := terminal .ReadPassword (int (os .Stdin .Fd ()))
150
+ confirm , err := term .ReadPassword (int (os .Stdin .Fd ()))
151
151
if err != nil {
152
152
return nil , err
153
153
}
0 commit comments