summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2005-12-28 23:18:58 +0000
committertailor <cygnus@janrain.com>2005-12-28 23:18:58 +0000
commitc6d35950a84919ab8f4db8a4ab390b07081840a6 (patch)
treeb54fcd6ba0733c88ed1c77f5f55499bc99a1bda0
parent42349a0d3ea1a985e642208a640e65f51a6db0f4 (diff)
downloadphp-openid-c6d35950a84919ab8f4db8a4ab390b07081840a6.zip
php-openid-c6d35950a84919ab8f4db8a4ab390b07081840a6.tar.gz
php-openid-c6d35950a84919ab8f4db8a4ab390b07081840a6.tar.bz2
[project @ Added documentation to HMACSHA1.]
-rw-r--r--Net/OpenID/HMACSHA1.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/Net/OpenID/HMACSHA1.php b/Net/OpenID/HMACSHA1.php
index feb04ef..b379438 100644
--- a/Net/OpenID/HMACSHA1.php
+++ b/Net/OpenID/HMACSHA1.php
@@ -1,5 +1,22 @@
<?php
+/**
+ * This is the HMACSHA1 implementation for the OpenID library.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: See the COPYING file included in this distribution.
+ *
+ * @package OpenID
+ * @author JanRain, Inc. <openid@janrain.com>
+ * @copyright 2005 Janrain, Inc.
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL
+ */
+
+/**
+ * SHA1_BLOCKSIZE is this module's SHA1 blocksize used by the fallback
+ * implementation.
+ */
define('SHA1_BLOCKSIZE', 64);
if (FALSE && function_exists('mhash')) {
@@ -24,6 +41,11 @@ if (FALSE && function_exists('mhash')) {
}
}
+ /**
+ * Compute an HMAC/SHA1 hash.
+ *
+ * @ignore
+ */
function Net_OpenID_HMACSHA1($key, $text) {
if (strlen($key) > SHA1_BLOCKSIZE) {
$key = sha1_raw($key, TRUE);