securitycode

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySecCode

func VerifySecCode(seccode1, seccode2 string) bool

VerifySecCode 不区分大小写

func VerifySecCodeIgnoreCase

func VerifySecCodeIgnoreCase(seccode1, seccode2 string) bool

VerifySecCodeIgnoreCase 区分大小写

Types

type SimpleSecCode

type SimpleSecCode struct {
	SecCodeLength int //验证码长度

	FontSize float64

	FontFilePath string
	// contains filtered or unexported fields
}

func NewSimpleSecCode

func NewSimpleSecCode() *SimpleSecCode

func (*SimpleSecCode) CreateImgFile

func (s *SimpleSecCode) CreateImgFile(path string) error

CreateImgFile 创建图片文件 ./test.png

func (*SimpleSecCode) Generate

func (s *SimpleSecCode) Generate() *SimpleSecCode

Generate 生成验证码

func (*SimpleSecCode) GetImgBase64

func (s *SimpleSecCode) GetImgBase64() (string, error)

GetImgBase64 获取验证码图片 base64

func (*SimpleSecCode) GetSecCode

func (s *SimpleSecCode) GetSecCode() string

GetSecCode 获取验证码字符串

func (*SimpleSecCode) GetSecCodeKey

func (s *SimpleSecCode) GetSecCodeKey() string

GetSecCodeKey 获取验证码key

Jump to

Keyboard shortcuts

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