summaryrefslogtreecommitdiffstats
path: root/system/libraries/Encrypt.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-06 13:12:15 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-06 13:12:15 +0200
commit968690491f625ddf59a5136b55ae1b9a2cf98a9a (patch)
tree6bc3eff6e8ec3ecae925ac3ff5c9542888f160f4 /system/libraries/Encrypt.php
parent58dc75471c25f33b059967ffb515eedc08e86a0b (diff)
parent6683c3c872952ae16d98c89ef474e5522897592a (diff)
Merge upstream branch and some changes for better readability
Diffstat (limited to 'system/libraries/Encrypt.php')
-rw-r--r--system/libraries/Encrypt.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index 17437c1ca..959e2eea8 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -44,28 +44,28 @@ class CI_Encrypt {
* @var string
*/
public $encryption_key = '';
-
+
/**
* Type of hash operation
- *
+ *
* @var string
*/
protected $_hash_type = 'sha1';
-
+
/**
* Flag for the existance of mcrypt
*
* @var bool
*/
protected $_mcrypt_exists = FALSE;
-
+
/**
* Current cipher to be used with mcrypt
*
* @var string
*/
protected $_mcrypt_cipher;
-
+
/**
* Method for encrypting/decrypting data
*
@@ -75,6 +75,8 @@ class CI_Encrypt {
/**
* Initialize Encryption class
+ *
+ * @return void
*/
public function __construct()
{
@@ -95,9 +97,9 @@ class CI_Encrypt {
*/
public function get_key($key = '')
{
- if ($key == '')
+ if ($key === '')
{
- if ($this->encryption_key != '')
+ if ($this->encryption_key !== '')
{
return $this->encryption_key;
}
@@ -447,7 +449,7 @@ class CI_Encrypt {
*/
protected function _get_cipher()
{
- if ($this->_mcrypt_cipher == '')
+ if ($this->_mcrypt_cipher === NULL)
{
return $this->_mcrypt_cipher = MCRYPT_RIJNDAEL_256;
}
@@ -464,7 +466,7 @@ class CI_Encrypt {
*/
protected function _get_mode()
{
- if ($this->_mcrypt_mode == '')
+ if ($this->_mcrypt_mode === NULL)
{
return $this->_mcrypt_mode = MCRYPT_MODE_CBC;
}