From 78ff3c607a6b7252c872ee6393c504d87c371489 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Tue, 20 Oct 2026 16:10:18 -0700 Subject: Remove a lot of files that aren't necessary --- tools/hashpw/hashpw.go | 53 -------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 tools/hashpw/hashpw.go (limited to 'tools/hashpw/hashpw.go') diff --git a/tools/hashpw/hashpw.go b/tools/hashpw/hashpw.go deleted file mode 100644 index 8244b64..0000000 --- a/tools/hashpw/hashpw.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2026 Rose Hogenson -// -// This file is part of roseh.moe. -// -// roseh.moe is free software: you can redistribute it and/or modify it -// under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, -// or (at your option) any later version. -// -// roseh.moe is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with roseh.moe. If not, -// see . - -package main - -import ( - "crypto/rand" - "encoding/base64" - "fmt" - "os" - - "golang.org/x/term" - "roseh.moe/pkg/roseh.moe/internal/pwhash" -) - -func hashpw() error { - fmt.Fprint(os.Stderr, "Enter password: ") - pw, err := term.ReadPassword(int(os.Stdin.Fd())) - fmt.Fprintln(os.Stderr) - if err != nil { - return err - } - salt := make([]byte, pwhash.SaltSize) - rand.Read(salt) - pwHash, err := pwhash.Hash(string(pw), salt) - if err != nil { - return err - } - fmt.Printf("NotepadPassword=\"%s\"\n", base64.StdEncoding.EncodeToString(append(salt, pwHash...))) - return nil -} - -func main() { - if err := hashpw(); err != nil { - fmt.Fprintf(os.Stderr, "hashpw: %s\n", err) - os.Exit(1) - } -} -- cgit v1.3.1