aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-09 23:26:56 +0100
committerJakob Unterwurzacher2015-11-09 23:33:35 +0100
commite43733ca0d995a48324ef75c952cc6cf25000650 (patch)
tree456befd943162f91ee007bfb2d21598f0d966032
parent51fcf61630905f5dc9370e18522cd0a6c086856d (diff)
Also hide master key reminder with "-q"
Also fix missing newline after password prompt
-rw-r--r--main.go2
-rw-r--r--masterkey.go2
-rw-r--r--password.go4
3 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index e3acb3c..707585d 100644
--- a/main.go
+++ b/main.go
@@ -180,7 +180,7 @@ func main() {
fmt.Printf("Password: ")
}
currentPassword = readPassword()
- cryptfs.Info.Printf("\nDecrypting master key... ")
+ cryptfs.Info.Printf("Decrypting master key... ")
cryptfs.Warn.Disable() // Silence DecryptBlock() error messages on incorrect password
key, cf, err = cryptfs.LoadConfFile(cfname, currentPassword)
cryptfs.Warn.Enable()
diff --git a/masterkey.go b/masterkey.go
index 69f268c..a1889b4 100644
--- a/masterkey.go
+++ b/masterkey.go
@@ -25,7 +25,7 @@ func printMasterKey(key []byte) {
}
}
- fmt.Printf(`
+ cryptfs.Info.Printf(`
ATTENTION:
Your master key is: %s
diff --git a/password.go b/password.go
index 821ecb4..6b3452a 100644
--- a/password.go
+++ b/password.go
@@ -9,9 +9,8 @@ import (
func readPasswordTwice() string {
fmt.Printf("Password: ")
p1 := readPassword()
- fmt.Printf("\nRepeat: ")
+ fmt.Printf("Repeat: ")
p2 := readPassword()
- fmt.Printf("\n")
if p1 != p2 {
fmt.Printf("Passwords do not match\n")
os.Exit(ERREXIT_PASSWORD)
@@ -23,6 +22,7 @@ func readPasswordTwice() string {
func readPassword() string {
fd := int(os.Stdin.Fd())
p, err := terminal.ReadPassword(fd)
+ fmt.Printf("\n")
if err != nil {
fmt.Printf("Error: Could not read password: %v\n", err)
os.Exit(ERREXIT_PASSWORD)