diff options
Diffstat (limited to 'cmd/fscrypt')
| -rw-r--r-- | cmd/fscrypt/format.go | 4 | ||||
| -rw-r--r-- | cmd/fscrypt/keys.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cmd/fscrypt/format.go b/cmd/fscrypt/format.go index 576d025..fc10d31 100644 --- a/cmd/fscrypt/format.go +++ b/cmd/fscrypt/format.go @@ -29,7 +29,7 @@ import ( "unicode/utf8" "github.com/urfave/cli" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" "github.com/google/fscrypt/util" ) @@ -64,7 +64,7 @@ func init() { flagPaddingLength = maxShortDisplay + 2*indentLength // We use the width of the terminal unless we cannot get the width. - width, _, err := terminal.GetSize(int(os.Stdout.Fd())) + width, _, err := term.GetSize(int(os.Stdout.Fd())) if err != nil { lineLength = fallbackLineLength } else { diff --git a/cmd/fscrypt/keys.go b/cmd/fscrypt/keys.go index 33461ec..cb86404 100644 --- a/cmd/fscrypt/keys.go +++ b/cmd/fscrypt/keys.go @@ -28,7 +28,7 @@ import ( "os" "github.com/pkg/errors" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" "github.com/google/fscrypt/actions" "github.com/google/fscrypt/crypto" @@ -88,13 +88,13 @@ func (p passphraseReader) Read(buf []byte) (int, error) { func getPassphraseKey(prompt string) (*crypto.Key, error) { // Only disable echo if stdin is actually a terminal. - if terminal.IsTerminal(stdinFd) { - state, err := terminal.MakeRaw(stdinFd) + if term.IsTerminal(stdinFd) { + state, err := term.MakeRaw(stdinFd) if err != nil { return nil, err } defer func() { - terminal.Restore(stdinFd, state) + term.Restore(stdinFd, state) fmt.Println() // To align input }() } |