Upgrade to CI 3.0.4 (#120)

This commit is contained in:
FrancescoUK committed 2016-03-08 17:44:59 +00:00
1 parent 9dcbef988a
commit 5df62610d2
182 files changed
+1383 -1013

No files matched your search

+10 -5
View File
@@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, British Columbia Institute of Technology
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -28,10 +28,10 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @link https://codeigniter.com
* @since Version 3.0.0
* @filesource
*/
@@ -46,7 +46,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author Andrey Andreev
* @link http://codeigniter.com/user_guide/libraries/encryption.html
* @link https://codeigniter.com/user_guide/libraries/encryption.html
*/
class CI_Encryption {
@@ -337,6 +337,11 @@ class CI_Encryption {
*/
public function create_key($length)
{
if (function_exists('random_bytes'))
{
return random_bytes((int) $length);
}
return ($this->_driver === 'mcrypt')
? mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)
: openssl_random_pseudo_bytes($length);