feat: publish Gamertan Web Foundations preview source
verify / verify (push) Successful in 2m55s

Export the reviewed application-neutral package set through the exact public allowlist. Development history and private application evidence remain outside this canonical source root.

Developed with material AI assistance under maintainer review.

Signed-off-by: Cole Speelman <crspeelman@gmail.com>
This commit is contained in:
2026-08-16 15:05:40 -04:00
commit 3a4b6db9b8
54 changed files with 4523 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MPL-2.0
package auth
import (
"errors"
"strings"
"testing"
)
func TestPasswordRoundTripAndBounds(t *testing.T) {
hash, err := HashPasswordWithRandom("correct horse battery staple", strings.NewReader(strings.Repeat("s", 16)))
if err != nil {
t.Fatal(err)
}
if !VerifyPassword(hash, "correct horse battery staple") || VerifyPassword(hash, "wrong password") {
t.Fatal("password verification mismatch")
}
if err = ValidatePassword("short"); err == nil {
t.Fatal("short password accepted")
}
}
func TestPasswordEntropyFailsClosed(t *testing.T) {
_, err := HashPasswordWithRandom("correct horse battery staple", errorReader{})
if err == nil {
t.Fatal("entropy failure accepted")
}
}
type errorReader struct{}
func (errorReader) Read([]byte) (int, error) { return 0, errors.New("no entropy") }