Versions in this module Expand all Collapse all v1 v1.0.3 Jul 15, 2023 v1.0.2 Jul 15, 2023 Changes in this version + const CollectNum + const DefaultLen + const Expiration + var ErrNotFound = errors.New("captcha: id not found") + var StdHeight = 80 + var StdWidth = 240 + func New() string + func NewLen(length int) (id string) + func RandomDigits(length int) []byte + func Reload(id string) bool + func Server(imgWidth, imgHeight int) http.Handler + func SetCircleCount(count int) + func SetCustomStore(s Store) + func SetMaxSkew(max float64) + func Verify(id string, digits []byte) bool + func VerifyString(id string, digits string) bool + func WriteAudio(w io.Writer, id string, lang string) error + func WriteImage(w io.Writer, id string, width, height int) error + type Audio struct + func NewAudio(id string, digits []byte, lang string) *Audio + func (a *Audio) EncodedLen() int + func (a *Audio) WriteTo(w io.Writer) (n int64, err error) + type Image struct + func NewImage(id string, digits []byte, width, height int) *Image + func (m *Image) WriteTo(w io.Writer) (int64, error) + type Store interface + Get func(id string, clear bool) (digits []byte) + Set func(id string, digits []byte) + func NewMemoryStore(collectNum int, expiration time.Duration) Store