summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-27 22:19:09 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-27 22:19:09 +0000
commitda928b9f00ae8412db30f1f5029d95cafcab49c8 (patch)
treeff7a62c2b84f5c71b977bf03b0db541fdc062cf5
parente69d98e779806e0445129112f611beb60d22cf92 (diff)
downloadphp-openid-da928b9f00ae8412db30f1f5029d95cafcab49c8.zip
php-openid-da928b9f00ae8412db30f1f5029d95cafcab49c8.tar.gz
php-openid-da928b9f00ae8412db30f1f5029d95cafcab49c8.tar.bz2
[project @ Documentation for HMACSHA1 module]
-rw-r--r--Auth/OpenID/HMACSHA1.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/Auth/OpenID/HMACSHA1.php b/Auth/OpenID/HMACSHA1.php
index 133391f..6bdf97c 100644
--- a/Auth/OpenID/HMACSHA1.php
+++ b/Auth/OpenID/HMACSHA1.php
@@ -20,12 +20,19 @@
define('Auth_OpenID_SHA1_BLOCKSIZE', 64);
if (!function_exists('sha1')) {
- // XXX: include the SHA1 code from Dan Libby's OpenID library
+ /**
+ * Return a raw SHA1 hash of the given string
+ *
+ * XXX: include the SHA1 code from Dan Libby's OpenID library
+ */
function Auth_OpenID_SHA1($text)
{
trigger_error('No SHA1 function found', E_USER_ERROR);
}
} else {
+ /**
+ * @ignore
+ */
function Auth_OpenID_SHA1($text)
{
$hex = sha1($text);
@@ -42,7 +49,10 @@ if (!function_exists('sha1')) {
/**
* Compute an HMAC/SHA1 hash.
*
- * @ignore
+ * @access private
+ * @param string $key The HMAC key
+ * @param string $text The message text to hash
+ * @return string $mac The MAC
*/
function Auth_OpenID_HMACSHA1($key, $text)
{