You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in image.go
make func encodedPNG() []byte to EncodedPNG() []byte,
it can support other http framework like "iris" "gin" !!!
and
1.
I recommend separate storage interfaces and image generator ,and delete storage interface,
For example,
com.google.code.kaptcha,
it only do the createText(),createImage().
other job like storage, i will choose like "redis" "mysql" "mongo"....
do not use "Id",and do not use "captcha.VerifyString(id string, digits string)" ,
I think the id just like session,but some people like me will use phone to Instead of id,and use
custom validation
The text was updated successfully, but these errors were encountered:
zhuxiujia
changed the title
image.go return []byte
image.go make func encodedPNG() to EncodedPNG()
Sep 9, 2018
You can WriteTo image into the bytes buffer to get PNG []byte.
You can use SetCustomStore to add a custom storage layer, including redis, mysql, mongo, or any other storage.
ID is not a username or phone number, it's a captcha ID — random string. It is important for security. Use the ID returned by New, don't invent your custom ids, please.
in image.go
make func encodedPNG() []byte to EncodedPNG() []byte,
it can support other http framework like "iris" "gin" !!!
and
1.
I recommend separate storage interfaces and image generator ,and delete storage interface,
For example,
com.google.code.kaptcha,
it only do the createText(),createImage().
other job like storage, i will choose like "redis" "mysql" "mongo"....
do not use "Id",and do not use "captcha.VerifyString(id string, digits string)" ,
I think the id just like session,but some people like me will use phone to Instead of id,and use
custom validation
The text was updated successfully, but these errors were encountered: