summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-02-01 20:42:46 +0000
committerJosh Hoyt <josh@janrain.com>2006-02-01 20:42:46 +0000
commitc0c77f56180e5e570295914fce493c6c8965da54 (patch)
tree1f713f5cd750b2ca356abe07168f2e4b432b6c3b
parent86bd1754d7eabbf0672a5e9593681cf08c66f76b (diff)
downloadphp-openid-c0c77f56180e5e570295914fce493c6c8965da54.zip
php-openid-c0c77f56180e5e570295914fce493c6c8965da54.tar.gz
php-openid-c0c77f56180e5e570295914fce493c6c8965da54.tar.bz2
[project @ Add toString to BigMath modules for testability]
-rw-r--r--Auth/OpenID/BigMath.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Auth/OpenID/BigMath.php b/Auth/OpenID/BigMath.php
index 481275e..ffe768d 100644
--- a/Auth/OpenID/BigMath.php
+++ b/Auth/OpenID/BigMath.php
@@ -246,6 +246,11 @@ class Auth_OpenID_BcMathWrapper extends Auth_OpenID_MathLibrary{
return $this->_powmod($base, $exponent, $modulus);
}
}
+
+ function toString($num)
+ {
+ return $num;
+ }
}
/**
@@ -305,6 +310,10 @@ class Auth_OpenID_GmpMathWrapper extends Auth_OpenID_MathLibrary{
return gmp_powm($base, $exponent, $modulus);
}
+ function toString($num)
+ {
+ return gmp_strval($num);
+ }
}
/**