summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Encryption.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php
index 6e71d6ee1..4258aee53 100644
--- a/system/libraries/Encryption.php
+++ b/system/libraries/Encryption.php
@@ -125,15 +125,6 @@ class CI_Encryption {
$this->initialize($params);
- if (empty($this->_driver))
- {
- $this->_driver = ($this->_drivers['mcrypt'] === TRUE)
- ? 'mcrypt'
- : 'openssl';
-
- log_message('debug', "Encryption: Auto-configured driver '".$params['driver']."'.");
- }
-
isset($this->_key) OR $this->_key = config_item('encryption_key');
if (empty($this->_key))
{
@@ -172,6 +163,15 @@ class CI_Encryption {
}
}
+ if (empty($this->_driver))
+ {
+ $this->_driver = ($this->_drivers['mcrypt'] === TRUE)
+ ? 'mcrypt'
+ : 'openssl';
+
+ log_message('debug', "Encryption: Auto-configured driver '".$this->_driver."'.");
+ }
+
empty($params['key']) OR $this->_key = $params['key'];
$this->{'_'.$this->_driver.'_initialize'}($params);
return $this;
@@ -807,7 +807,7 @@ class CI_Encryption {
*/
public function __get($key)
{
- return in_array($key, array('cipher', 'mode', 'driver', 'drivers'), TRUE)
+ return in_array($key, array('cipher', 'mode', 'driver', 'drivers', 'digests'), TRUE)
? $this->{'_'.$key}
: NULL;
}