feat: secure service connections and login

This commit is contained in:
2026-11-06 21:14:49 +03:00
parent cb51354889
commit 48918e8b19
59 changed files with 1980 additions and 316 deletions
+8
View File
@@ -68,6 +68,14 @@ func (h *Hasher) Verify(value, encodedHash string) (bool, error) {
return subtle.ConstantTimeCompare(actual, digest) == 1, nil
}
func (h *Hasher) NeedsRehash(encodedHash string) (bool, error) {
config, _, _, err := decode(encodedHash)
if err != nil {
return false, err
}
return config != h.config, nil
}
func (h *Hasher) DummyHash() string {
return h.dummyHash
}