aboutsummaryrefslogtreecommitdiff
path: root/ask.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-24 09:24:01 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-24 09:24:01 +0200
commitc1a37e887d2470b04fe4f7f39149f7d14b3f487d (patch)
tree70d2c76ab1ec130ce78dc3224601590aecd7a7f1 /ask.go
parentdf67212e43224165d7367f1d2981f38a7a4d4752 (diff)
Refactor Kdf
Diffstat (limited to 'ask.go')
-rw-r--r--ask.go5
1 files changed, 4 insertions, 1 deletions
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()