verifycode

package
v0.0.0-...-4aaf4b1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package verifycode @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package verifycode @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package verifycode @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

View Source
var COMICSAN = []byte{}/* 245600 elements not displayed */

COMICSAN is the data for the "comic san" TrueType font.

Functions

func CheckCaptcha

func CheckCaptcha(ctx context.Context, code string, uuid string) bool

CheckCaptcha 获取并检查验证码是否正确 @param code 输入的验证码 @param uuid 验证码缓存uuid标识

func CreateCaptcha

func CreateCaptcha(ctx context.Context, n int) (b []byte, uuid string)

CreateCaptcha 创建验证码 @return b 验证码二进制对象 @param uuid 验证码缓存uuid标识

func CreateCaptchaBy

func CreateCaptchaBy(ctx context.Context, n int, width int, height int) (b []byte, uuid string)

CreateCaptchaBy 创建验证码(指定图片宽高) @return b 验证码二进制对象 @param uuid 验证码缓存uuid标识

func GetRandStr

func GetRandStr(n int) (randStr string)

GetRandStr 生成随机数

func ImgText

func ImgText(width, height int, text string) (b []byte)

ImgText 生成随机数 生成指定大小的图片二进制对象

Types

This section is empty.

Jump to

Keyboard shortcuts

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