Skip to content

go-orz/captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Captcha

验证码    验证码    验证码

验证码    验证码    验证码

验证码    验证码    验证码

Usage

package main

import (
	"log"

	"github.com/go-orz/captcha"
)

func main() {
	c, err := captcha.New()
	if err != nil {
		log.Fatal(err)
	}
	img, word := c.Create()
	println("captcha:", word)
	base64Encoding, err := captcha.ToBase64(img)
	if err != nil {
		log.Fatal(err)
	}
	println("base64:", base64Encoding)
}