Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

oxCaptcha Class Reference

Inheritance diagram for oxCaptcha:
Collaboration diagram for oxCaptcha:

List of all members.

Public Member Functions

 getText ()
 getHash ($sText=null)
 getTextHash ($sText)
 getImageUrl ()
 isImageVisible ()
 pass ($sMac, $sMacHash)

Protected Member Functions

 _passFromSession ($sMacHash, $sHash, $iTime)
 _passFromDb ($iMacHash, $sHash, $iTime)

Protected Attributes

 $_iMacLength = 5
 $_sText = null
 $_iTimeout = 300

Private Attributes

 $_sMacChars = 'abcdefghijkmnpqrstuvwxyz23456789'

Detailed Description

Class handling CAPTCHA image This class requires utility file utils/verificationimg.php as image generator

Definition at line 8 of file oxcaptcha.php.


Member Function Documentation

oxCaptcha._passFromDb ( iMacHash,
sHash,
iTime 
) [protected]

Checks for DB captcha hash validity

Parameters:
int $iMacHash hash key
string $sHash captcha hash
int $iTime check time
Returns:
bool

Definition at line 158 of file oxcaptcha.php.

oxCaptcha._passFromSession ( sMacHash,
sHash,
iTime 
) [protected]

Checks for session captcha hash validity

Parameters:
string $sMacHash hash key
string $sHash captcha hash
int $iTime check time
Returns:
bool

Definition at line 133 of file oxcaptcha.php.

oxCaptcha.getHash ( sText = null  ) 

Returns text hash

Parameters:
string $sText User supplie text
Returns:
string

Definition at line 62 of file oxcaptcha.php.

oxCaptcha.getImageUrl (  ) 

Returns url to CAPTCHA image generator.

Returns:
string

Definition at line 106 of file oxcaptcha.php.

oxCaptcha.getText (  ) 

Returns text

Returns:
string

Definition at line 43 of file oxcaptcha.php.

oxCaptcha.getTextHash ( sText  ) 

Returns given string captcha hash

Parameters:
string $sText string to hash
Returns:
string

Definition at line 91 of file oxcaptcha.php.

oxCaptcha.isImageVisible (  ) 

Checks if image could be generated

Returns:
bool

Definition at line 119 of file oxcaptcha.php.

oxCaptcha.pass ( sMac,
sMacHash 
)

Verifies captcha input vs supplied hash. Returns true on success.

Parameters:
string $sMac User supplied text
string $sMacHash Generated hash
Returns:
bool

Definition at line 185 of file oxcaptcha.php.


Member Data Documentation

oxCaptcha.$_iMacLength = 5 [protected]

Definition at line 15 of file oxcaptcha.php.

oxCaptcha.$_iTimeout = 300 [protected]

Definition at line 36 of file oxcaptcha.php.

oxCaptcha.$_sMacChars = 'abcdefghijkmnpqrstuvwxyz23456789' [private]

Definition at line 29 of file oxcaptcha.php.

oxCaptcha.$_sText = null [protected]

Definition at line 22 of file oxcaptcha.php.


The documentation for this class was generated from the following file: