diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2026-10-20 16:10:18 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2026-10-20 16:33:08 -0700 |
| commit | 78ff3c607a6b7252c872ee6393c504d87c371489 (patch) | |
| tree | 16773e064500935d7ff59436db51c87083a678cb /internal/pwhash/pwhash.go | |
| parent | Add a link to temporarily log in another device (diff) | |
| download | roseh.moe-78ff3c607a6b7252c872ee6393c504d87c371489.tar.zst | |
Remove a lot of files that aren't necessary
Diffstat (limited to 'internal/pwhash/pwhash.go')
| -rw-r--r-- | internal/pwhash/pwhash.go | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/internal/pwhash/pwhash.go b/internal/pwhash/pwhash.go deleted file mode 100644 index 5a2082d..0000000 --- a/internal/pwhash/pwhash.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Rose Hogenson <r@roseh.moe> -// -// 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 <https://www.gnu.org/licenses/>. - -package pwhash - -import ( - "crypto/pbkdf2" - "crypto/sha512" -) - -const SaltSize = 8 - -const defaultIter = 12175430 // from tools/finditer - -func HashIter(password string, salt []byte, iter int) ([]byte, error) { - return pbkdf2.Key(sha512.New, password, salt, iter, 32) -} - -func Hash(password string, salt []byte) ([]byte, error) { - return HashIter(password, salt, defaultIter) -} |
