Auth_OpenID_MathLibrary Class Reference

Inheritance diagram for Auth_OpenID_MathLibrary:

Inheritance graph
[legend]

List of all members.


Detailed Description

BigMath: A math library wrapper that abstracts out the underlying long integer library.

PHP versions 4 and 5

LICENSE: See the COPYING file included in this distribution.

private

Author:
JanRain, Inc. <[email protected]> 2005-2008 Janrain, Inc. http://www.apache.org/licenses/LICENSE-2.0 Apache Needed for random number generation Need Auth_OpenID.bytes(). The superclass of all big-integer math implementations private

Definition at line 33 of file BigMath.php.


Public Member Functions

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

Member Function Documentation

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.

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.

Auth_OpenID_MathLibrary.base64ToLong ( str  ) 

Definition at line 112 of file BigMath.php.

Auth_OpenID_MathLibrary.longToBase64 ( str  ) 

Definition at line 123 of file BigMath.php.

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.


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

Generated on Thu Feb 19 15:03:27 2009 for OXID eShop CE by  doxygen 1.5.5