Files
site/utils/captcha.go
2022-02-26 12:16:53 -06:00

18 lines
263 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(5 * time.Minute)
}
}