Files
site/utils/captcha.go
2022-03-03 21:33:39 -06:00

18 lines
264 B
Go

package utils
import (
"math/rand"
"time"
)
func GenerateCaptchaValues() (int, int) {
return rand.Intn(100), rand.Intn(100)
}
func UpdateCaptcha(captcha *[2]int) {
for {
captcha[0], captcha[1] = GenerateCaptchaValues()
time.Sleep(30 * time.Minute)
}
}