Initial commit.

This commit is contained in:
2025-08-13 12:17:25 -04:00
commit 581771d93a
11 changed files with 878 additions and 0 deletions

14
password.go Normal file
View File

@ -0,0 +1,14 @@
package complexity
// log2(10year × (1trillion/s))
const passwordMinEntropy = 68.096549
func StrongPasswordBytes(password []byte) bool {
entropy, _ := Bytes(password)
return entropy > passwordMinEntropy
}
func StrongPassword(password string) bool {
entropy, _ := String(password)
return entropy > passwordMinEntropy
}