summaryrefslogtreecommitdiffstats
path: root/system/libraries/Sha1.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@server-speed.net>2011-01-28 22:51:06 +0100
committerFlorian Pritz <bluewind@server-speed.net>2011-01-28 22:58:52 +0100
commitce2b69675075444c9e40b72bcdd42ab7edbbe633 (patch)
tree2932f13b0db14fe53dc0622d888318db638a017f /system/libraries/Sha1.php
parentb6b8a6587c399bfd89e13e92ce04ee8486688e6e (diff)
update to CI 2.0
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
Diffstat (limited to 'system/libraries/Sha1.php')
-rwxr-xr-x[-rw-r--r--]system/libraries/Sha1.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php
index f9611a8a5..ad747a001 100644..100755
--- a/system/libraries/Sha1.php
+++ b/system/libraries/Sha1.php
@@ -2,11 +2,11 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 4.3.2 or newer
+ * An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
- * @copyright Copyright (c) 2008 - 2010, EllisLab, Inc.
+ * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
@@ -44,7 +44,7 @@
*/
class CI_SHA {
- function CI_SHA()
+ public function __construct()
{
log_message('debug', "SHA1 Class Initialized");
}
@@ -55,7 +55,7 @@ class CI_SHA {
* @access public
* @param string
* @return string
- */
+ */
function generate($str)
{
$n = ((strlen($str) + 8) >> 6) + 1;
@@ -117,7 +117,7 @@ class CI_SHA {
return $this->_hex($a).$this->_hex($b).$this->_hex($c).$this->_hex($d).$this->_hex($e);
}
-
+
// --------------------------------------------------------------------
/**
@@ -126,7 +126,7 @@ class CI_SHA {
* @access private
* @param string
* @return string
- */
+ */
function _hex($str)
{
$str = dechex($str);
@@ -138,7 +138,7 @@ class CI_SHA {
return $str;
}
-
+
// --------------------------------------------------------------------
/**
@@ -146,7 +146,7 @@ class CI_SHA {
*
* @access private
* @return string
- */
+ */
function _ft($t, $b, $c, $d)
{
if ($t < 20)
@@ -166,7 +166,7 @@ class CI_SHA {
*
* @access private
* @return string
- */
+ */
function _kt($t)
{
if ($t < 20)
@@ -186,7 +186,7 @@ class CI_SHA {
return -899497514;
}
}
-
+
// --------------------------------------------------------------------
/**
@@ -194,7 +194,7 @@ class CI_SHA {
*
* @access private
* @return string
- */
+ */
function _safe_add($x, $y)
{
$lsw = ($x & 0xFFFF) + ($y & 0xFFFF);
@@ -202,7 +202,7 @@ class CI_SHA {
return ($msw << 16) | ($lsw & 0xFFFF);
}
-
+
// --------------------------------------------------------------------
/**
@@ -210,7 +210,7 @@ class CI_SHA {
*
* @access private
* @return integer
- */
+ */
function _rol($num, $cnt)
{
return ($num << $cnt) | $this->_zero_fill($num, 32 - $cnt);
@@ -223,7 +223,7 @@ class CI_SHA {
*
* @access private
* @return string
- */
+ */
function _zero_fill($a, $b)
{
$bin = decbin($a);