From c1a37e887d2470b04fe4f7f39149f7d14b3f487d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 24 Apr 2017 09:24:01 +0200 Subject: Refactor Kdf --- ask.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ask.go') diff --git a/ask.go b/ask.go index 2215877..ce0bf91 100644 --- a/ask.go +++ b/ask.go @@ -12,7 +12,10 @@ var ( ErrNoMatch = errors.New("passwords don't match") ) -func AskPassword(confirm bool) (string, error) { +func AskConfirmed() (string, error) { return askPassword(true) } +func AskPassword() (string, error) { return askPassword(false) } + +func askPassword(confirm bool) (string, error) { f := os.Stdin fd := f.Fd() -- cgit v1.2.3