remove old commented code

This commit is contained in:
ed 2019-12-18 13:04:23 +01:00
parent 841351fb7e
commit 910651390d
1 changed files with 3 additions and 14 deletions

17
main.go
View File

@ -10,6 +10,7 @@ import (
"io/ioutil"
"os"
"regexp"
"strings"
"syscall"
"golang.org/x/crypto/ssh/terminal"
)
@ -141,28 +142,16 @@ func main() {
err := os.Rename(fn,clearfn)
checkErr(err)
data2file(secretfn,secret)
fmt.Printf("think about shredding %s\n", clearfn)
case "s":
fmt.Print("password: ")
pw := readPass()
fmt.Print("\n")
key := keyMkr(pw)
secret := file2data(fn)
datafn := fn + ".clr"
datafn := strings.TrimRight(fn,".hdn")
data := decrypt(secret, key)
data2file(datafn, data)
}
/*
var passwd string = "ThisAnnPassphrase"
fmt.Println(passwd)
key := keyMkr(passwd)
fmt.Println(string(key))
data := []byte("Thi is some data")
fmt.Println(string(data))
fmt.Println("encryption:")
dataSealed := encrypt(data,key)
fmt.Println(string(dataSealed))
fmt.Println("decryption:")
fmt.Println(string(decrypt(dataSealed,key)))
*/
}