diff options
author | tailor <cygnus@janrain.com> | 2006-01-04 17:26:29 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-04 17:26:29 +0000 |
commit | 380c3f781a8317621b9815ecb58a3cc1199a1eb5 (patch) | |
tree | 340a2b4e24e30739e9a422926148739c20ab109a | |
parent | b43fe59d26c2c19408bd470b239921f7f1d4700c (diff) | |
download | php-openid-380c3f781a8317621b9815ecb58a3cc1199a1eb5.zip php-openid-380c3f781a8317621b9815ecb58a3cc1199a1eb5.tar.gz php-openid-380c3f781a8317621b9815ecb58a3cc1199a1eb5.tar.bz2 |
[project @ Fixed encoding for sha1 return value and fixed getBytes function call]
-rw-r--r-- | Net/OpenID/CryptUtil.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php index 7f4d6de..d32511e 100644 --- a/Net/OpenID/CryptUtil.php +++ b/Net/OpenID/CryptUtil.php @@ -96,7 +96,7 @@ class Net_OpenID_CryptUtil { * @return string The resulting SHA1 hash. */ function sha1($str) { - return sha1($str, true); + return base64_decode(sha1($str)); } /** @@ -327,8 +327,8 @@ class Net_OpenID_CryptUtil { * @return string $result A string of randomly-chosen characters from $chrs */ function randomString($length, $chrs = null) { - if ($chrs == null) { - return getBytes($length); + if ($chrs === null) { + return Net_OpenID_CryptUtil::getBytes($length); } else { $n = strlen($chrs); $str = ""; |