Auth_OpenID_MathLibrary Class Reference

Inheritance diagram for Auth_OpenID_MathLibrary:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 longToBinary ($long)
 binaryToLong ($str)
 base64ToLong ($str)
 longToBase64 ($str)
 rand ($stop)

Detailed Description

Definition at line 33 of file BigMath.php.


Member Function Documentation

Auth_OpenID_MathLibrary::base64ToLong ( str  ) 

Definition at line 112 of file BigMath.php.

References binaryToLong().

Auth_OpenID_MathLibrary::binaryToLong ( str  ) 

Given a binary string, returns the binary string converted to a long number.

Parameters:
string $binary The binary version of a long number, probably as a result of calling longToBinary
Returns:
integer $long The long number equivalent of the binary string $str

Definition at line 86 of file BigMath.php.

Referenced by base64ToLong(), and rand().

Auth_OpenID_MathLibrary::longToBase64 ( str  ) 

Definition at line 123 of file BigMath.php.

References longToBinary().

Auth_OpenID_MathLibrary::longToBinary ( long  ) 

Given a long integer, returns the number converted to a binary string. This function accepts long integer values of arbitrary magnitude and uses the local large-number math library when available.

Parameters:
integer $long The long number (can be a normal PHP integer or a number created by one of the available long number libraries)
Returns:
string $binary The binary version of $long

Definition at line 45 of file BigMath.php.

Referenced by longToBase64(), and rand().

Auth_OpenID_MathLibrary::rand ( stop  ) 

Returns a random number in the specified range. This function accepts $start, $stop, and $step values of arbitrary magnitude and will utilize the local large-number math library when available.

Parameters:
integer $start The start of the range, or the minimum random number to return
integer $stop The end of the range, or the maximum random number to return
integer $step The step size, such that $result - ($step * N) = $start for some N
Returns:
integer $result The resulting randomly-generated number

Definition at line 142 of file BigMath.php.

References binaryToLong(), Auth_OpenID::bytes(), Auth_OpenID_CryptUtil::getBytes(), and longToBinary().


The documentation for this class was generated from the following file:
Generated on Sat Jan 3 04:23:39 2009 for TYPO3 API by  doxygen 1.4.7