diff options
author | tailor <cygnus@janrain.com> | 2005-12-29 18:54:53 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2005-12-29 18:54:53 +0000 |
commit | 74d6c3a384c4ab8df09f72c034e6f173f44dcfc8 (patch) | |
tree | 3ed74f6063f1f5589d2e19eef67cbdd38fa4396b | |
parent | 1e24e162a20b200803dd66cdbd1f01157ef0d453 (diff) | |
download | php-openid-74d6c3a384c4ab8df09f72c034e6f173f44dcfc8.zip php-openid-74d6c3a384c4ab8df09f72c034e6f173f44dcfc8.tar.gz php-openid-74d6c3a384c4ab8df09f72c034e6f173f44dcfc8.tar.bz2 |
[project @ Added phpdoc directives and inserted trigger_error for platform int fallback implementation]
-rw-r--r-- | Net/OpenID/CryptUtil.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php index 61a12ae..8d8f4cb 100644 --- a/Net/OpenID/CryptUtil.php +++ b/Net/OpenID/CryptUtil.php @@ -202,6 +202,8 @@ class Net_OpenID_CryptUtil { /** * Net_OpenID_MathWrapper is a base class that defines the interface * to whatever large number math library is available, if any. + * + * @package OpenID */ class Net_OpenID_MathWrapper { var $type = 'dumb'; @@ -254,6 +256,8 @@ class Net_OpenID_MathWrapper { * Net_OpenID_BcMathWrapper implements the Net_OpenID_MathWrapper * interface and wraps the functionality provided by the BCMath * library. + * + * @package OpenID */ class Net_OpenID_BcMathWrapper extends Net_OpenID_MathWrapper { var $type = 'bcmath'; @@ -286,6 +290,8 @@ class Net_OpenID_BcMathWrapper extends Net_OpenID_MathWrapper { /** * Net_OpenID_GmpMathWrapper implements the Net_OpenID_MathWrapper * interface and wraps the functionality provided by the GMP library. + * + * @package OpenID */ class Net_OpenID_GmpMathWrapper extends Net_OpenID_MathWrapper { var $type = 'gmp'; @@ -323,6 +329,8 @@ class Net_OpenID_GmpMathWrapper extends Net_OpenID_MathWrapper { * Net_OpenID_MathLibrary implements the Singleton pattern to generate * the appropriate Net_OpenID_MathWrapper instance for use by crypto * code. + * + * @package OpenID */ class Net_OpenID_MathLibrary { @@ -364,6 +372,10 @@ class Net_OpenID_MathLibrary { } if (!$lib) { + trigger_error("No usable big integer library present (gmp or bcmath). " . + "Only dumb mode OpenID is available.", + E_USER_NOTICE); + $lib =& new Net_OpenID_MathWrapper(); } } |