captcha
Interface ICaptchaGenerator

All Known Implementing Classes:
ZipBinaryImageCaptchaGenerator

public interface ICaptchaGenerator

This defines the methods, every captcha generator has to implement.


Method Summary
 java.lang.String createCaptcha(java.lang.String a_captchaString)
          Creates a new captcha from the given input word.
 java.lang.String getCaptchaDataFormat()
          Returns the format of the captcha data (e.g.
 int getMaximumStringLength()
          Returns the maximum number of characters of the captcha generators alphabet, which are supported as input when creating a captcha.
 java.lang.String getValidCharacters()
          Returns the string of valid captcha characters.
 

Method Detail

getValidCharacters

java.lang.String getValidCharacters()
Returns the string of valid captcha characters. The data which are included in the captcha can be words over this alphabet.

Returns:
An alphabet with characters this CaptchaGenerator supports.

getMaximumStringLength

int getMaximumStringLength()
Returns the maximum number of characters of the captcha generators alphabet, which are supported as input when creating a captcha.

Returns:
The maximum captcha generator input word length.

createCaptcha

java.lang.String createCaptcha(java.lang.String a_captchaString)
                               throws java.lang.Exception
Creates a new captcha from the given input word. The input must be a word over the captcha generators alphabet. It haven't to be longer than the maximum string length supported from the captcha generator. This mehtod can throw an exception, if the input string is longer than the maximum supported length or if there are not allowed letters in. The return value is a Base64 encoded string with the captcha data.

Parameters:
a_captchaString - The input, which shall be included in the captcha.
Returns:
A Base64 encoded string with the captcha data.
Throws:
java.lang.Exception

getCaptchaDataFormat

java.lang.String getCaptchaDataFormat()
Returns the format of the captcha data (e.g. JPEG). So the JAP client of the blockee can present the data corrctly.

Returns:
A string with the data format of the captcha.