initial commit

This commit is contained in:
m.zare
2026-04-10 18:25:21 +03:30
commit 77ca6c34a3
263 changed files with 34470 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package auth
import (
"crypto/rand"
"fmt"
"math/big"
)
func generateOTP() (string, error) {
newInt := big.NewInt(10000) // 0 .. 999999
n, err := rand.Int(rand.Reader, newInt)
if err != nil {
return "", err
}
return fmt.Sprintf("%04d", n.Int64()), err
}