image_captcha

package
v0.0.0-...-fbd1cd9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CaptchaExpiration  = 5 * time.Minute // 验证码 5 分钟内有效
	CaptchaCachePrefix = "atk_captcha:"
)

Variables

This section is empty.

Functions

func CheckImageCaptchaCode

func CheckImageCaptchaCode(ip string, code string) bool

获取对应 IP 图片验证码正确的值

func GetNewImageCaptchaBase64

func GetNewImageCaptchaBase64(ip string) ([]byte, error)

获取新验证码 base64 格式图片 (调用该函数将销毁原有验证码)

func InvalidateImageCaptcha

func InvalidateImageCaptcha(ip string)

销毁图片验证码

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL