captcha

package
v0.0.0-...-7b3f1ad Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCaptcha

func CheckCaptcha(point string, cacheDataByte []byte) (bool, error)

func GenerateCaptcha

func GenerateCaptcha() (*Response, *CheckData, error)

GenerateCaptcha generates the captcha data.

func StringToMD5

func StringToMD5(src string) string

StringToMD5 MD5

Types

type CheckData

type CheckData struct {
	CaptchaByte []byte `json:"captcha_byte"`
	CaptchaKey  string `json:"captcha_key"`
}

type Response

type Response struct {
	CaptchaKey  string `json:"captcha_key,omitempty"`
	ImageBase64 string `json:"image_base64,omitempty"`
	TileBase64  string `json:"tile_base64,omitempty"`
	TileWidth   int    `json:"tile_width,omitempty"`
	TileHeight  int    `json:"tile_height,omitempty"`
	TileX       int    `json:"tile_x,omitempty"`
	TileY       int    `json:"tile_y,omitempty"`
}

Jump to

Keyboard shortcuts

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