diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-10-06 21:08:45 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-10-06 21:08:45 -0700 |
| commit | c5a5b24cf6370ab549c033b20ad0389ec3ce8ec1 (patch) | |
| tree | dfd8b0914e2021fdd75e65c1db1beadbb51f74d9 /tools/hashpw | |
| parent | d35bbbd54ed3de79d2a7d709013ff49d4a9413b8 (diff) | |
| download | roseh.moe-c5a5b24cf6370ab549c033b20ad0389ec3ce8ec1.tar.zst | |
Simplify simplify simplify
Diffstat (limited to 'tools/hashpw')
| -rw-r--r-- | tools/hashpw/hashpw.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tools/hashpw/hashpw.go b/tools/hashpw/hashpw.go deleted file mode 100644 index c668622..0000000 --- a/tools/hashpw/hashpw.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "encoding/base64" - "fmt" - "os" - - "gitlab.com/rhogenson/roseh.moe/internal/pwhash" - "golang.org/x/term" -) - -func hashpw() error { - fmt.Fprint(os.Stderr, "Enter password: ") - password, err := term.ReadPassword(int(os.Stdin.Fd())) - fmt.Fprintln(os.Stderr) - if err != nil { - return err - } - hash, err := pwhash.Hash(string(password)) - if err != nil { - return err - } - fmt.Printf("notepad-password=%s\n", base64.RawURLEncoding.EncodeToString(hash)) - return nil -} - -func main() { - if err := hashpw(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} |
