From 6f3c43aca62a7d33a19f14f6ad7c16891952673a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 15 Sep 2026 19:55:21 -0400 Subject: fix: outstanding-stake ledger, owner backpressure, editor state preservation --- internal/player/password.go | 77 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 10 deletions(-) (limited to 'internal/player/password.go') diff --git a/internal/player/password.go b/internal/player/password.go index 17e4218..f8ce3cc 100644 --- a/internal/player/password.go +++ b/internal/player/password.go @@ -3,30 +3,87 @@ package player import ( "crypto/rand" "crypto/sha256" + "crypto/subtle" "encoding/base64" + "encoding/hex" "fmt" + "strconv" "strings" + + "golang.org/x/crypto/argon2" +) + +// Argon2id parameters for password hashing. Memory cost dominates the +// GPU/ASIC attack economics; 64 MiB per hash is affordable for a MUD's +// login rate while making brute force expensive. Stored format: +// +// argon2id: