Documentation
¶
Index ¶
Constants ¶
View Source
const ( // 去除容易混淆的字母数字 Seed_No_Similar_Alphanumeric = "abcdefghjkmnprstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ2345678" // 字母(a-zA-Z) + 数字(0-9) Seed_Alphanumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" // 字母(a-zA-Z) Seed_Alphabetic = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // 数字(0-9) Seed_Numeric = "0123456789" )
Variables ¶
View Source
var ( ACTIONJ = captchaFont{/* contains filtered or unexported fields */} EPI_LOG = captchaFont{/* contains filtered or unexported fields */} FRESNEL = captchaFont{/* contains filtered or unexported fields */} HEADACHE = captchaFont{/* contains filtered or unexported fields */} LEXO = captchaFont{/* contains filtered or unexported fields */} PREFIX = captchaFont{/* contains filtered or unexported fields */} PROGBOT = captchaFont{/* contains filtered or unexported fields */} RANSOM = captchaFont{/* contains filtered or unexported fields */} ROBOT = captchaFont{/* contains filtered or unexported fields */} SCANDAL = captchaFont{/* contains filtered or unexported fields */} )
View Source
var HanZiLib = []rune("的是不了在人有我他这个们中国大上为和地到以说时要就出会可也用学生很好看语文字又都从自前后方向如果得而与本去来之发也些里思想情况感觉间新旧长短高低白红黄绿蓝黑少多每次定总般")
View Source
var SourceFS embed.FS
Functions ¶
func NewCaptchaFont ¶
func NewCaptchaFont(fontPath string) captchaFont
Types ¶
type Captcha ¶
type Captcha interface {
SetLineNum(int)
SetBackgroundColor(color.Color)
SetSeed(seed string)
SetFont(captchaFont)
Text() string
GetBytes() ([]byte, error)
SaveFile(filename string) error
Base64() (string, error)
// contains filtered or unexported methods
}
func NewCalculationCaptcha ¶
func NewChineseCaptcha ¶
func NewGifCaptcha ¶
func NewSimpleCaptcha ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
