add vendoring

This commit is contained in:
Aine
2022-11-16 12:08:51 +02:00
parent 14751cbf3a
commit c1d33fe3cb
1104 changed files with 759066 additions and 0 deletions

22
vendor/gitlab.com/etke.cc/go/secgen/password.go generated vendored Normal file
View File

@@ -0,0 +1,22 @@
package secgen
import (
"crypto/rand"
"math/big"
"strings"
)
const charset = "abcdedfghijklmnopqrstABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" // a-z A-Z 0-9
var charsetlen = big.NewInt(57)
// Password generates secure password
func Password(length int) string {
var password strings.Builder
for i := 0; i < length; i++ {
index, _ := rand.Int(rand.Reader, charsetlen)
password.WriteByte(charset[index.Int64()])
}
return password.String()
}