func (c *Captcha) genRandChars() []byte {
	return utils.RandomCreateBytes(c.ChallengeNums, defaultChars...)
}
generate rand chars with default chars
package captcha
import (
	"fmt"
	"html/template"
	"net/http"
	"path"
	"strings"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/cache"
	"github.com/astaxie/beego/context"
	"github.com/astaxie/beego/utils"
)
var (
	defaultChars = []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
)
const (
	challengeNums    = 6
	expiration       = 600
	fieldIdName      = "captcha_id"
	fieldCaptchaName = "captcha"
	cachePrefix      = "captcha_"
	defaultURLPrefix = "/captcha/"
)
type Captcha struct {
	store cache.Cache
	URLPrefix string
	FieldIdName string
	FieldCaptchaName string
	StdWidth  int
	StdHeight int
	ChallengeNums int
	Expiration int64
	CachePrefix string
}
func (c *Captcha) key(id string) string {
	return c.CachePrefix + id
}