This commit is contained in:
2025-05-17 04:36:06 +07:00
parent 8643af86ee
commit 4bd18ee756
13 changed files with 188 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
package password
import "math/rand"
var (
letters = []rune("abcdefghijklmnopqrstuvwxyz123456789")
)
func GenPass(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
}
return string(b)
}