diff options
-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 = ""; |