golang吧 关注:6,129贴子:14,135
  • 3回复贴,共1

介绍一个 golang 图像验证码,简单易用,高安全性的“行为式验证

只看楼主收藏回复

go-captcha, 一个简洁易用、交互友好、高安全性的点选行为验证码 Go 库 ,采用 “验证码展示-采集用户行为-验证行为数据” 为流程,用户无需键盘手动输入,极大优化传统验证码用户体验不佳的问题,支持PC端及移动端,带有与前端交互的DEMO。
- Github:[https://github.com/wenlng/go-captcha](https://github.com/wenlng/go-captcha)
- Go实例代码:[https://github.com/wenlng/go-captcha-example](https://github.com/wenlng/go-captcha-example)
- Vue实例代码:[https://github.com/wenlng/go-captcha-example-vue](https://github.com/wenlng/go-captcha-example-vue)
- React实例代码:[https://github.com/wenlng/go-captcha-example-react](https://github.com/wenlng/go-captcha-example-react)
- 在线演示:[http://47.104.180.148:8081/go_captcha_demo](http://47.104.180.148:8081/go_captcha_demo)
- 作者网站: [http://witkeycode.com](http://witkeycode.com)


安装模块
go get -u github.com/wenlng/go-captcha/captcha
快速使
package main
import (
"fmt"
"os"
"github.com/wenlng/go-captcha/captcha"
)
func main(){
// Captcha Single Instances
capt := captcha.GetCaptcha()
// 生成验证码
dots, b64, tb64, key, err := capt.Generate()
if err != nil {
panic(err)
return
}
// 主图base64
fmt.Println(len(b64))
// 缩略图base64
fmt.Println(len(tb64))
// 唯一key
fmt.Println(key)
// 文本位置验证数据
fmt.Println(dots)
}


1楼2021-12-27 17:44回复
    挺好的贴子没人回复


    IP属地:河北来自Android客户端2楼2022-03-29 00:18
    回复
      不错哦,支出一下


      IP属地:北京3楼2022-04-20 08:56
      回复
        挺好的


        IP属地:广东4楼2022-04-20 13:37
        回复