| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Source view] [Print] [Project Stats]
BigMath: A math library wrapper that abstracts out the underlying long integer library. PHP versions 4 and 5
| Author: | JanRain, Inc. <openid@janrain.com> |
| Copyright: | 2005-2008 Janrain, Inc. |
| License: | http://www.apache.org/licenses/LICENSE-2.0 Apache |
| File Size: | 474 lines (12 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Auth_OpenID_MathLibrary:: (5 methods):
longToBinary()
binaryToLong()
base64ToLong()
longToBase64()
rand()
Auth_OpenID_BcMathWrapper:: (11 methods):
add()
sub()
pow()
cmp()
init()
mod()
mul()
div()
_powmod()
powmod()
toString()
Auth_OpenID_GmpMathWrapper:: (15 methods):
add()
sub()
pow()
cmp()
init()
mod()
mul()
div()
powmod()
toString()
Auth_OpenID_math_extensions()
Auth_OpenID_detectMathLibrary()
Auth_OpenID_getMathLib()
Auth_OpenID_setNoMathSupport()
Auth_OpenID_noMathSupport()
Class: Auth_OpenID_MathLibrary - X-Ref
The superclass of all big-integer math implementations| longToBinary($long) X-Ref |
| 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. param: integer $long The long number (can be a normal PHP return: string $binary The binary version of $long |
| binaryToLong($str) X-Ref |
| Given a binary string, returns the binary string converted to a long number. param: string $binary The binary version of a long number, return: integer $long The long number equivalent of the binary |
| base64ToLong($str) X-Ref |
| No description |
| longToBase64($str) X-Ref |
| No description |
| rand($stop) X-Ref |
| 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. param: integer $start The start of the range, or the minimum param: integer $stop The end of the range, or the maximum param: integer $step The step size, such that $result - ($step return: integer $result The resulting randomly-generated number |
Class: Auth_OpenID_BcMathWrapper - X-Ref
Exposes BCmath math library functionality.| add($x, $y) X-Ref |
| No description |
| sub($x, $y) X-Ref |
| No description |
| pow($base, $exponent) X-Ref |
| No description |
| cmp($x, $y) X-Ref |
| No description |
| init($number, $base = 10) X-Ref |
| No description |
| mod($base, $modulus) X-Ref |
| No description |
| mul($x, $y) X-Ref |
| No description |
| div($x, $y) X-Ref |
| No description |
| _powmod($base, $exponent, $modulus) X-Ref |
| Same as bcpowmod when bcpowmod is missing |
| powmod($base, $exponent, $modulus) X-Ref |
| No description |
| toString($num) X-Ref |
| No description |
Class: Auth_OpenID_GmpMathWrapper - X-Ref
Exposes GMP math library functionality.| add($x, $y) X-Ref |
| No description |
| sub($x, $y) X-Ref |
| No description |
| pow($base, $exponent) X-Ref |
| No description |
| cmp($x, $y) X-Ref |
| No description |
| init($number, $base = 10) X-Ref |
| No description |
| mod($base, $modulus) X-Ref |
| No description |
| mul($x, $y) X-Ref |
| No description |
| div($x, $y) X-Ref |
| No description |
| powmod($base, $exponent, $modulus) X-Ref |
| No description |
| toString($num) X-Ref |
| No description |
| Auth_OpenID_math_extensions() X-Ref |
| Define the supported extensions. An extension array has keys 'modules', 'extension', and 'class'. 'modules' is an array of PHP module names which the loading code will attempt to load. These values will be suffixed with a library file extension (e.g. ".so"). 'extension' is the name of a PHP extension which will be tested before 'modules' are loaded. 'class' is the string name of a {@link Auth_OpenID_MathWrapper} subclass which should be instantiated if a given extension is present. You can define new math library implementations and add them to this array. |
| Auth_OpenID_detectMathLibrary($exts) X-Ref |
| Detect which (if any) math library is available |
| Auth_OpenID_getMathLib() X-Ref |
| {@link Auth_OpenID_getMathLib} checks for the presence of long number extension modules and returns an instance of {@link Auth_OpenID_MathWrapper} which exposes the module's functionality. Checks for the existence of an extension module described by the result of {@link Auth_OpenID_math_extensions()} and returns an instance of a wrapper for that extension module. If no extension module is found, an instance of {@link Auth_OpenID_MathWrapper} is returned, which wraps the native PHP integer implementation. The proper calling convention for this method is $lib =& Auth_OpenID_getMathLib(). This function checks for the existence of specific long number implementations in the following order: GMP followed by BCmath. return: Auth_OpenID_MathWrapper $instance An instance of |
| Auth_OpenID_setNoMathSupport() X-Ref |
| No description |
| Auth_OpenID_noMathSupport() X-Ref |
| No description |
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |