captcha

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = base64Captcha.DriverString{
	Height:          40,
	Width:           100,
	NoiseCount:      2,
	ShowLineOptions: 2 | 4,
	Length:          4,
	Source:          "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
	BgColor:         &color.RGBA{255, 255, 255, 255},
	Fonts:           []string{"wqy-microhei.ttc"},
}

Functions

func GenerateCaptcha

func GenerateCaptcha() (id, b64s, answer string)

func InitCaptcha

func InitCaptcha(router *gin.Engine)

func SaveCaptcha

func SaveCaptcha(imageBase64, path string)

func VarifyCaptcha

func VarifyCaptcha(id, val string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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