all repos — captcha @ 4b8382af1554c4a28cf9819998a1e99b48908281

Go package captcha implements generation and verification of image and audio CAPTCHAs.

4b8382af
Remove "Std" from StdCollectNum and StdExpiration.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:35:53 +0200
dab96732
Add Store interface.

Standard storage is now known as memoryStore (created with
NewMemoryStore exported function). It's still default, however there's
now an option to replace it with a custom store by implementing Store
interface and calling SetCustomStore.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:25:39 +0200
230b62a6
Add example HTTP server that uses the package.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 17:34:47 +0200
fe4a5975
Thinner strike-through on captcha image.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 12:26:12 +0200
8a2b5ae5
Add Audio.EncodedLen. Workaround for Chrome WAV bug.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 02:16:01 +0200
d010e3f9
Add VerifyString function.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 00:42:43 +0200
bd0535ea
Add CaptchaServer.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 23:57:29 +0200
4572d7de
Fix comments, apply gofmt.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 22:49:14 +0200
11dc0126
generate: rename to main.go, add Makefile.

Fix adding extra space in the generated sounds.go.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 21:54:32 +0200
2ef763a3
Rename cmd to capgen, originals to generate.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 21:45:37 +0200
5dd14861
Add captcha test.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 16:09:55 +0200
8779418c
Add store test.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:58:05 +0200
7b585d44
Fix collection (locking and getting next value).
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:53:45 +0200
90e4f749
newStore: accept collectNum and expiration time.

Prevoiusly, Expiration and CollectNum were hard-coded into store.go.
This change moves these constants to captcha.go (renaming to Std*), and
makes newStore accept them as arguments.

This will enable setting these paraments by package users sometime in
the future, if needed, and also allows testing of the store garbage
collection.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:19:49 +0200
9de0d066
Add ErrNotFound, return it from WriteAudio/Image.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 14:34:11 +0200
68d217e7
Export RandomDigits. Remove NewRandom* functions.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 13:30:31 +0200
c179a205
Rename "numbers" to "digits" everywhere.

Plus fix comments.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 13:23:17 +0200
2052308d
Set capacity for audio buffer. Rename makeStaticNoise to makeWhiteNoise.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 12:56:02 +0200
874a3063
Rearrange code and fix docs.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 21:20:12 +0200
8b932fcf
Implement a single captcha test command.

The new command replaces old test command-line utilities from cmd/image
and cmd/audio directories. It can now generate both image and audio
captchas, and accepts a few useful flags.

Edit .gitignore to reflect changes.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 21:17:23 +0200
e40250a1
Add NewRandomAudio function.

Audio test cmd now writes to stdout.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:53:26 +0200
79744759
Replace PNGEncode with WriteTo for Image.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:48:58 +0200
e3eb2248
Add WriteAudio function.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:44:02 +0200
5357b20f
Rename CaptchaImage -> Image, CaptchaAudio -> Audio.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:41:00 +0200
82004bd9
Apply gofmt; fix comment in generate.go.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:50:37 +0200
9ac4ea2b
Better randomize background and sounds.

Shorten intervals between prelude beeps.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:41:48 +0200
45c2a02d
Lower level of beep sound.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:39:51 +0200
8f4b2012
First version of audio captcha.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 13:13:51 +0200
3586f91d
Move image generation test program to cmd/image.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 11:24:17 +0200
778d34d6
image: move border calculation to calculateSizes().
Dmitry Chestnykh dmitry@codingrobots.com
Fri, 22 Apr 2011 00:05:19 +0200
452b826a
Fix comments.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:43:47 +0200
b5845762
Move rand initialization to image.go.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:08:58 +0200
8033b950
Clarify docs.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:07:23 +0200
d36aa1f3
image: refactor; add more color variations.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 22:43:25 +0200
aa0588b4
Refactor store into its own file.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 22:28:52 +0200
0674e88f
Accept the length of the random sequence of numbers.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:18:00 +0200
f9f7db1f
Call Collect on a separate goroutine.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:14:28 +0200
59a641ef
Update documentation.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:05:53 +0200
cbab3d06
cmd: use standard width and height for image.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:53:34 +0200
01012728
Document functions and types in captcha.go.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:53:08 +0200
bb39fc5c
Refactored image captcha ready, and documented.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:41:44 +0200
f1572d4d
Numbers are now laid out correctly.

Next commits will introduce perturbations.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 16:48:12 +0200
d88ce819
Started work on code cleanup.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 01:12:31 +0200
9da9f1ad
Gofmt font.go.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 13:18:51 +0200
364b4304
Move image-related functions into image.go.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 03:14:29 +0200
b04efdcc
Add line that strikes through digits.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 03:05:45 +0200
caf79f3b
Reorganize code. Add storage.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 01:24:30 +0200
69b50fb6
Initial version (numbers).
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 19 Apr 2011 20:32:40 +0200