mirror of
https://github.com/rls-moe/nyx
synced 2024-11-13 22:12:24 +00:00
17 lines
333 B
Go
17 lines
333 B
Go
package resources
|
|
|
|
import (
|
|
"github.com/dchest/captcha"
|
|
"net/http"
|
|
)
|
|
|
|
func MakeCaptcha() string {
|
|
return captcha.NewLen(5)
|
|
}
|
|
|
|
func VerifyCaptcha(r *http.Request) bool {
|
|
return captcha.VerifyString(r.FormValue("captchaId"), r.FormValue("captchaSolution"))
|
|
}
|
|
|
|
var ServeCaptcha = captcha.Server(captcha.StdWidth, captcha.StdHeight)
|