captcha

package
v0.0.0-...-a172071 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Captcha

type Captcha struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Captcha

func (*Captcha) DrawNoise

func (c *Captcha) DrawNoise(img *image.RGBA)

在图像上绘制随机线条作为噪声

func (*Captcha) Generate

func (c *Captcha) Generate() ([]byte, string)

生成验证码

type Config

type Config struct {
	Width      int
	Height     int
	CharsCount int
	FontSize   int
}

Jump to

Keyboard shortcuts

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