summaryrefslogtreecommitdiffstats
path: root/Net/OpenID
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-01-05 17:26:08 +0000
committertailor <cygnus@janrain.com>2006-01-05 17:26:08 +0000
commitd390709324e5df794b9ff6ce12ce88136544b1c7 (patch)
treed5ddb0c2b1c71da6ba17f4756d0dedb3267037fd /Net/OpenID
parenta7befe11acaf5aade5c76c9eb7d7499ef01b01da (diff)
downloadphp-openid-d390709324e5df794b9ff6ce12ce88136544b1c7.zip
php-openid-d390709324e5df794b9ff6ce12ce88136544b1c7.tar.gz
php-openid-d390709324e5df794b9ff6ce12ce88136544b1c7.tar.bz2
[project @ Lowercased null, true, and false]
Diffstat (limited to 'Net/OpenID')
-rw-r--r--Net/OpenID/CryptUtil.php2
-rw-r--r--Net/OpenID/DiffieHellman.php10
-rw-r--r--Net/OpenID/HMACSHA1.php8
-rw-r--r--Net/OpenID/KVForm.php12
4 files changed, 16 insertions, 16 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php
index 1664661..6d2a193 100644
--- a/Net/OpenID/CryptUtil.php
+++ b/Net/OpenID/CryptUtil.php
@@ -51,7 +51,7 @@ class Net_OpenID_CryptUtil {
{
$bytes = '';
$f = @fopen("/dev/urandom", "r");
- if ($f === FALSE) {
+ if ($f === false) {
if (!defined('Net_OpenID_USE_INSECURE_RAND')) {
trigger_error('Set Net_OpenID_USE_INSECURE_RAND to ' .
'continue with insecure random.',
diff --git a/Net/OpenID/DiffieHellman.php b/Net/OpenID/DiffieHellman.php
index d5d0609..c9ac4cf 100644
--- a/Net/OpenID/DiffieHellman.php
+++ b/Net/OpenID/DiffieHellman.php
@@ -40,8 +40,8 @@ class Net_OpenID_DiffieHellman {
var $private;
var $lib = null;
- function Net_OpenID_DiffieHellman($mod = NULL, $gen = NULL,
- $private = NULL)
+ function Net_OpenID_DiffieHellman($mod = null, $gen = null,
+ $private = null)
{
$this->lib =& Net_OpenID_MathLibrary::getLibWrapper();
@@ -62,20 +62,20 @@ class Net_OpenID_DiffieHellman {
E_USER_ERROR);
}
- if ($mod === NULL) {
+ if ($mod === null) {
$this->mod = $this->lib->init($_Net_OpenID_DEFAULT_MOD);
} else {
$this->mod = $mod;
}
- if ($gen === NULL) {
+ if ($gen === null) {
$this->gen = $this->lib->init($this->DEFAULT_GEN);
} else {
$this->gen = $gen;
}
$this->private =
- ($private === NULL) ? $this->generateRandom() : $private;
+ ($private === null) ? $this->generateRandom() : $private;
$this->public = $this->lib->powmod($this->gen, $this->private,
$this->mod);
diff --git a/Net/OpenID/HMACSHA1.php b/Net/OpenID/HMACSHA1.php
index 4c79d1b..276d4df 100644
--- a/Net/OpenID/HMACSHA1.php
+++ b/Net/OpenID/HMACSHA1.php
@@ -19,7 +19,7 @@
*/
define('SHA1_BLOCKSIZE', 64);
-if (FALSE && function_exists('mhash')) {
+if (false && function_exists('mhash')) {
function Net_OpenID_HMACSHA1($key, $text)
{
return mhash(MHASH_SHA1, $text, $key);
@@ -51,14 +51,14 @@ if (FALSE && function_exists('mhash')) {
function Net_OpenID_HMACSHA1($key, $text)
{
if (strlen($key) > SHA1_BLOCKSIZE) {
- $key = sha1_raw($key, TRUE);
+ $key = sha1_raw($key, true);
}
$key = str_pad($key, SHA1_BLOCKSIZE, chr(0x00));
$ipad = str_repeat(chr(0x36), SHA1_BLOCKSIZE);
$opad = str_repeat(chr(0x5c), SHA1_BLOCKSIZE);
- $hash1 = sha1_raw(($key ^ $ipad) . $text, TRUE);
- $hmac = sha1_raw(($key ^ $opad) . $hash1, TRUE);
+ $hash1 = sha1_raw(($key ^ $ipad) . $text, true);
+ $hmac = sha1_raw(($key ^ $opad) . $hash1, true);
return $hmac;
}
}
diff --git a/Net/OpenID/KVForm.php b/Net/OpenID/KVForm.php
index ebc41e7..7107da3 100644
--- a/Net/OpenID/KVForm.php
+++ b/Net/OpenID/KVForm.php
@@ -31,22 +31,22 @@ class Net_OpenID_KVForm {
list($key, $value) = $value;
}
- if (strpos($key, ':') !== FALSE) {
+ if (strpos($key, ':') !== false) {
trigger_error('":" in key:' . addslashes($key),
E_USER_WARNING);
- return NULL;
+ return null;
}
- if (strpos($key, "\n") !== FALSE) {
+ if (strpos($key, "\n") !== false) {
trigger_error('"\n" in key:' . addslashes($key),
E_USER_WARNING);
- return NULL;
+ return null;
}
- if (strpos($value, "\n") !== FALSE) {
+ if (strpos($value, "\n") !== false) {
trigger_error('"\n" in value:' . addslashes($value),
E_USER_WARNING);
- return NULL;
+ return null;
}
$serialized .= "$key:$value\n";
}