blob: 995bf0bbe5f88a04d041be49ca69738dc4f6162c [file] [log] [blame]
Andrey Andreevc5536aa2012-11-01 17:33:58 +02001<?php
Derek Allard2067d1a2008-11-13 22:59:24 +00002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
Andrey Andreev7c251b32011-12-27 16:37:23 +02008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Open Software License version 3.0
Andrey Andreev7c251b32011-12-27 16:37:23 +020010 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -050011 * This source file is subject to the Open Software License (OSL 3.0) that is
12 * bundled with this package in the files license.txt / license.rst. It is
13 * also available through the world wide web at this URL:
14 * http://opensource.org/licenses/OSL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
Derek Allard2067d1a2008-11-13 22:59:24 +000019 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
darwinel871754a2014-02-11 17:34:57 +010021 * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Derek Allard2067d1a2008-11-13 22:59:24 +000023 * @link http://codeigniter.com
24 * @since Version 1.0
25 * @filesource
26 */
Andrey Andreevc5536aa2012-11-01 17:33:58 +020027defined('BASEPATH') OR exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +000028
Derek Allard2067d1a2008-11-13 22:59:24 +000029/**
30 * CodeIgniter Encryption Class
31 *
Andrey Andreevfc4db342014-08-27 14:18:19 +030032 * Provides two-way keyed encoding using Mcrypt
Derek Allard2067d1a2008-11-13 22:59:24 +000033 *
34 * @package CodeIgniter
35 * @subpackage Libraries
36 * @category Libraries
Derek Jonesf4a4bd82011-10-20 12:18:42 -050037 * @author EllisLab Dev Team
Derek Allard2067d1a2008-11-13 22:59:24 +000038 * @link http://codeigniter.com/user_guide/libraries/encryption.html
39 */
40class CI_Encrypt {
41
Timothy Warren0688ac92012-04-20 10:25:04 -040042 /**
43 * Reference to the user's encryption key
44 *
45 * @var string
46 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030047 public $encryption_key = '';
Andrey Andreev56454792012-05-17 14:32:19 +030048
Timothy Warren0688ac92012-04-20 10:25:04 -040049 /**
50 * Type of hash operation
Andrey Andreev56454792012-05-17 14:32:19 +030051 *
Timothy Warren0688ac92012-04-20 10:25:04 -040052 * @var string
53 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030054 protected $_hash_type = 'sha1';
Andrey Andreev56454792012-05-17 14:32:19 +030055
Timothy Warren0688ac92012-04-20 10:25:04 -040056 /**
57 * Flag for the existance of mcrypt
58 *
59 * @var bool
60 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030061 protected $_mcrypt_exists = FALSE;
Andrey Andreev56454792012-05-17 14:32:19 +030062
Timothy Warren0688ac92012-04-20 10:25:04 -040063 /**
64 * Current cipher to be used with mcrypt
65 *
66 * @var string
67 */
Greg Akerd1af1852011-12-25 21:59:30 -060068 protected $_mcrypt_cipher;
Andrey Andreev56454792012-05-17 14:32:19 +030069
Timothy Warren0688ac92012-04-20 10:25:04 -040070 /**
71 * Method for encrypting/decrypting data
72 *
73 * @var int
74 */
Greg Akerd1af1852011-12-25 21:59:30 -060075 protected $_mcrypt_mode;
Derek Allard2067d1a2008-11-13 22:59:24 +000076
Timothy Warren0688ac92012-04-20 10:25:04 -040077 /**
78 * Initialize Encryption class
Andrey Andreev56454792012-05-17 14:32:19 +030079 *
80 * @return void
Timothy Warren0688ac92012-04-20 10:25:04 -040081 */
Greg Akera9263282010-11-10 15:26:43 -060082 public function __construct()
Derek Allard2067d1a2008-11-13 22:59:24 +000083 {
Andrey Andreev6eb77da2014-05-31 21:18:17 +030084 if (($this->_mcrypt_exists = function_exists('mcrypt_encrypt')) === FALSE)
85 {
86 show_error('The Encrypt library requires the Mcrypt extension.');
87 }
88
Andrey Andreevcc6dbda2012-01-08 06:35:17 +020089 log_message('debug', 'Encrypt Class Initialized');
Derek Allard2067d1a2008-11-13 22:59:24 +000090 }
91
92 // --------------------------------------------------------------------
93
94 /**
95 * Fetch the encryption key
96 *
97 * Returns it as MD5 in order to have an exact-length 128 bit key.
98 * Mcrypt is sensitive to keys that are not the correct length
99 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000100 * @param string
101 * @return string
102 */
Greg Akerd1af1852011-12-25 21:59:30 -0600103 public function get_key($key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000104 {
Alex Bilbied261b1e2012-06-02 11:12:16 +0100105 if ($key === '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000106 {
Alex Bilbied261b1e2012-06-02 11:12:16 +0100107 if ($this->encryption_key !== '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000108 {
109 return $this->encryption_key;
110 }
111
Joffrey Jaffeuxba7f50b2012-06-06 01:40:01 +0200112 $key = config_item('encryption_key');
Derek Allard2067d1a2008-11-13 22:59:24 +0000113
Greg Akerd1af1852011-12-25 21:59:30 -0600114 if ($key === FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000115 {
116 show_error('In order to use the encryption class requires that you set an encryption key in your config file.');
117 }
118 }
119
120 return md5($key);
121 }
122
123 // --------------------------------------------------------------------
124
125 /**
126 * Set the encryption key
127 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000128 * @param string
Andrew Podner4296a652012-12-17 07:51:15 -0500129 * @return CI_Encrypt
Derek Allard2067d1a2008-11-13 22:59:24 +0000130 */
Greg Akerd1af1852011-12-25 21:59:30 -0600131 public function set_key($key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000132 {
133 $this->encryption_key = $key;
Greg Akerd1af1852011-12-25 21:59:30 -0600134 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000135 }
136
137 // --------------------------------------------------------------------
138
139 /**
140 * Encode
141 *
142 * Encodes the message string using bitwise XOR encoding.
143 * The key is combined with a random hash, and then it
144 * too gets converted using XOR. The whole thing is then run
Andrey Andreev6eb77da2014-05-31 21:18:17 +0300145 * through mcrypt using the randomized key. The end result
146 * is a double-encrypted message string that is randomized
147 * with each call to this function, even if the supplied
148 * message and key are the same.
Derek Allard2067d1a2008-11-13 22:59:24 +0000149 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000150 * @param string the string to encode
151 * @param string the key
152 * @return string
153 */
Greg Akerd1af1852011-12-25 21:59:30 -0600154 public function encode($string, $key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000155 {
Andrey Andreev6eb77da2014-05-31 21:18:17 +0300156 return base64_encode($this->mcrypt_encode($string, $this->get_key($key)));
Derek Allard2067d1a2008-11-13 22:59:24 +0000157 }
158
159 // --------------------------------------------------------------------
160
161 /**
162 * Decode
163 *
164 * Reverses the above process
165 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000166 * @param string
167 * @param string
168 * @return string
169 */
Greg Akerd1af1852011-12-25 21:59:30 -0600170 public function decode($string, $key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000171 {
Bogdan Lysenkoc16b4f42012-10-11 11:41:01 +0300172 if (preg_match('/[^a-zA-Z0-9\/\+=]/', $string) OR base64_encode(base64_decode($string)) !== $string)
Derek Allard2067d1a2008-11-13 22:59:24 +0000173 {
174 return FALSE;
175 }
176
Andrey Andreev6eb77da2014-05-31 21:18:17 +0300177 return $this->mcrypt_decode(base64_decode($string), $this->get_key($key));
Derek Allard2067d1a2008-11-13 22:59:24 +0000178 }
179
180 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200181
Derek Jones09c77932010-08-31 13:17:10 -0500182 /**
183 * Encode from Legacy
184 *
185 * Takes an encoded string from the original Encryption class algorithms and
186 * returns a newly encoded string using the improved method added in 2.0.0
187 * This allows for backwards compatibility and a method to transition to the
188 * new encryption algorithms.
Barry Mienydd671972010-10-04 16:33:58 +0200189 *
Derek Jones09c77932010-08-31 13:17:10 -0500190 * For more details, see http://codeigniter.com/user_guide/installation/upgrade_200.html#encryption
191 *
Derek Jones09c77932010-08-31 13:17:10 -0500192 * @param string
193 * @param int (mcrypt mode constant)
194 * @param string
195 * @return string
196 */
Greg Akerd1af1852011-12-25 21:59:30 -0600197 public function encode_from_legacy($string, $legacy_mode = MCRYPT_MODE_ECB, $key = '')
Derek Jones09c77932010-08-31 13:17:10 -0500198 {
Andrey Andreev6eb77da2014-05-31 21:18:17 +0300199 if (preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
Andrey Andreev7c251b32011-12-27 16:37:23 +0200200 {
201 return FALSE;
202 }
Barry Mienydd671972010-10-04 16:33:58 +0200203
Derek Jones09c77932010-08-31 13:17:10 -0500204 // decode it first
205 // set mode temporarily to what it was when string was encoded with the legacy
Barry Mienydd671972010-10-04 16:33:58 +0200206 // algorithm - typically MCRYPT_MODE_ECB
Derek Jones09c77932010-08-31 13:17:10 -0500207 $current_mode = $this->_get_mode();
208 $this->set_mode($legacy_mode);
Barry Mienydd671972010-10-04 16:33:58 +0200209
Derek Jones09c77932010-08-31 13:17:10 -0500210 $key = $this->get_key($key);
Derek Jones09c77932010-08-31 13:17:10 -0500211 $dec = base64_decode($string);
Derek Jones09c77932010-08-31 13:17:10 -0500212 if (($dec = $this->mcrypt_decode($dec, $key)) === FALSE)
213 {
Andrey Andreevf696c1f2012-06-12 12:14:51 +0300214 $this->set_mode($current_mode);
Derek Jones09c77932010-08-31 13:17:10 -0500215 return FALSE;
216 }
217
218 $dec = $this->_xor_decode($dec, $key);
219
220 // set the mcrypt mode back to what it should be, typically MCRYPT_MODE_CBC
Derek Jones092103e2010-09-02 11:11:58 -0500221 $this->set_mode($current_mode);
Derek Jones09c77932010-08-31 13:17:10 -0500222
223 // and re-encode
224 return base64_encode($this->mcrypt_encode($dec, $key));
225 }
226
227 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200228
Derek Allard2067d1a2008-11-13 22:59:24 +0000229 /**
Derek Allard2067d1a2008-11-13 22:59:24 +0000230 * XOR Decode
231 *
232 * Takes an encoded string and key as input and generates the
233 * plain-text original message
234 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000235 * @param string
236 * @param string
237 * @return string
238 */
Greg Akerd1af1852011-12-25 21:59:30 -0600239 protected function _xor_decode($string, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000240 {
241 $string = $this->_xor_merge($string, $key);
242
243 $dec = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200244 for ($i = 0, $l = strlen($string); $i < $l; $i++)
Derek Allard2067d1a2008-11-13 22:59:24 +0000245 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200246 $dec .= ($string[$i++] ^ $string[$i]);
Derek Allard2067d1a2008-11-13 22:59:24 +0000247 }
248
249 return $dec;
250 }
251
252 // --------------------------------------------------------------------
253
254 /**
255 * XOR key + string Combiner
256 *
257 * Takes a string and key as input and computes the difference using XOR
258 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000259 * @param string
260 * @param string
261 * @return string
262 */
Greg Akerd1af1852011-12-25 21:59:30 -0600263 protected function _xor_merge($string, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000264 {
265 $hash = $this->hash($key);
266 $str = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200267 for ($i = 0, $ls = strlen($string), $lh = strlen($hash); $i < $ls; $i++)
Derek Allard2067d1a2008-11-13 22:59:24 +0000268 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200269 $str .= $string[$i] ^ $hash[($i % $lh)];
Derek Allard2067d1a2008-11-13 22:59:24 +0000270 }
271
272 return $str;
273 }
274
275 // --------------------------------------------------------------------
276
277 /**
278 * Encrypt using Mcrypt
279 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000280 * @param string
281 * @param string
282 * @return string
283 */
Greg Akerd1af1852011-12-25 21:59:30 -0600284 public function mcrypt_encode($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000285 {
286 $init_size = mcrypt_get_iv_size($this->_get_cipher(), $this->_get_mode());
287 $init_vect = mcrypt_create_iv($init_size, MCRYPT_RAND);
288 return $this->_add_cipher_noise($init_vect.mcrypt_encrypt($this->_get_cipher(), $key, $data, $this->_get_mode(), $init_vect), $key);
289 }
290
291 // --------------------------------------------------------------------
292
293 /**
294 * Decrypt using Mcrypt
295 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000296 * @param string
297 * @param string
298 * @return string
299 */
Greg Akerd1af1852011-12-25 21:59:30 -0600300 public function mcrypt_decode($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000301 {
302 $data = $this->_remove_cipher_noise($data, $key);
303 $init_size = mcrypt_get_iv_size($this->_get_cipher(), $this->_get_mode());
304
305 if ($init_size > strlen($data))
306 {
307 return FALSE;
308 }
309
310 $init_vect = substr($data, 0, $init_size);
311 $data = substr($data, $init_size);
312 return rtrim(mcrypt_decrypt($this->_get_cipher(), $key, $data, $this->_get_mode(), $init_vect), "\0");
313 }
314
315 // --------------------------------------------------------------------
316
317 /**
318 * Adds permuted noise to the IV + encrypted data to protect
319 * against Man-in-the-middle attacks on CBC mode ciphers
320 * http://www.ciphersbyritter.com/GLOSSARY.HTM#IV
321 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000322 * @param string
323 * @param string
324 * @return string
325 */
Greg Akerd1af1852011-12-25 21:59:30 -0600326 protected function _add_cipher_noise($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000327 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200328 $key = $this->hash($key);
Derek Allard2067d1a2008-11-13 22:59:24 +0000329 $str = '';
330
Andrey Andreev7c251b32011-12-27 16:37:23 +0200331 for ($i = 0, $j = 0, $ld = strlen($data), $lk = strlen($key); $i < $ld; ++$i, ++$j)
Derek Allard2067d1a2008-11-13 22:59:24 +0000332 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200333 if ($j >= $lk)
Derek Allard2067d1a2008-11-13 22:59:24 +0000334 {
335 $j = 0;
336 }
337
Andrey Andreev7c251b32011-12-27 16:37:23 +0200338 $str .= chr((ord($data[$i]) + ord($key[$j])) % 256);
Derek Allard2067d1a2008-11-13 22:59:24 +0000339 }
340
341 return $str;
342 }
343
344 // --------------------------------------------------------------------
345
346 /**
347 * Removes permuted noise from the IV + encrypted data, reversing
348 * _add_cipher_noise()
349 *
350 * Function description
351 *
Timothy Warren0688ac92012-04-20 10:25:04 -0400352 * @param string $data
353 * @param string $key
Andrey Andreev38d0e932012-04-03 19:27:45 +0300354 * @return string
Derek Allard2067d1a2008-11-13 22:59:24 +0000355 */
Greg Akerd1af1852011-12-25 21:59:30 -0600356 protected function _remove_cipher_noise($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000357 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200358 $key = $this->hash($key);
Derek Allard2067d1a2008-11-13 22:59:24 +0000359 $str = '';
360
Andrey Andreev7c251b32011-12-27 16:37:23 +0200361 for ($i = 0, $j = 0, $ld = strlen($data), $lk = strlen($key); $i < $ld; ++$i, ++$j)
Derek Allard2067d1a2008-11-13 22:59:24 +0000362 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200363 if ($j >= $lk)
Derek Allard2067d1a2008-11-13 22:59:24 +0000364 {
365 $j = 0;
366 }
367
Andrey Andreev7c251b32011-12-27 16:37:23 +0200368 $temp = ord($data[$i]) - ord($key[$j]);
Derek Allard2067d1a2008-11-13 22:59:24 +0000369
370 if ($temp < 0)
371 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200372 $temp += 256;
Derek Allard2067d1a2008-11-13 22:59:24 +0000373 }
Barry Mienydd671972010-10-04 16:33:58 +0200374
Derek Allard2067d1a2008-11-13 22:59:24 +0000375 $str .= chr($temp);
376 }
377
378 return $str;
379 }
380
381 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200382
Derek Allard2067d1a2008-11-13 22:59:24 +0000383 /**
384 * Set the Mcrypt Cipher
385 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300386 * @param int
Andrew Podner4296a652012-12-17 07:51:15 -0500387 * @return CI_Encrypt
Derek Allard2067d1a2008-11-13 22:59:24 +0000388 */
Greg Akerd1af1852011-12-25 21:59:30 -0600389 public function set_cipher($cipher)
Derek Allard2067d1a2008-11-13 22:59:24 +0000390 {
391 $this->_mcrypt_cipher = $cipher;
Greg Akerd1af1852011-12-25 21:59:30 -0600392 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000393 }
394
395 // --------------------------------------------------------------------
396
397 /**
398 * Set the Mcrypt Mode
399 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300400 * @param int
Andrew Podner4296a652012-12-17 07:51:15 -0500401 * @return CI_Encrypt
Derek Allard2067d1a2008-11-13 22:59:24 +0000402 */
Andrey Andreev7c251b32011-12-27 16:37:23 +0200403 public function set_mode($mode)
Derek Allard2067d1a2008-11-13 22:59:24 +0000404 {
405 $this->_mcrypt_mode = $mode;
Greg Akerd1af1852011-12-25 21:59:30 -0600406 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000407 }
408
409 // --------------------------------------------------------------------
410
411 /**
412 * Get Mcrypt cipher Value
413 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300414 * @return int
Derek Allard2067d1a2008-11-13 22:59:24 +0000415 */
Greg Akerd1af1852011-12-25 21:59:30 -0600416 protected function _get_cipher()
Derek Allard2067d1a2008-11-13 22:59:24 +0000417 {
Andrey Andreev79eca3d2012-06-04 18:28:50 +0300418 if ($this->_mcrypt_cipher === NULL)
Derek Allard2067d1a2008-11-13 22:59:24 +0000419 {
Andrey Andreevd655a992012-01-10 22:31:29 +0200420 return $this->_mcrypt_cipher = MCRYPT_RIJNDAEL_256;
Derek Allard2067d1a2008-11-13 22:59:24 +0000421 }
422
423 return $this->_mcrypt_cipher;
424 }
425
426 // --------------------------------------------------------------------
427
428 /**
429 * Get Mcrypt Mode Value
430 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300431 * @return int
Derek Allard2067d1a2008-11-13 22:59:24 +0000432 */
Greg Akerd1af1852011-12-25 21:59:30 -0600433 protected function _get_mode()
Derek Allard2067d1a2008-11-13 22:59:24 +0000434 {
Andrey Andreev79eca3d2012-06-04 18:28:50 +0300435 if ($this->_mcrypt_mode === NULL)
Derek Allard2067d1a2008-11-13 22:59:24 +0000436 {
Andrey Andreevd655a992012-01-10 22:31:29 +0200437 return $this->_mcrypt_mode = MCRYPT_MODE_CBC;
Derek Allard2067d1a2008-11-13 22:59:24 +0000438 }
Barry Mienydd671972010-10-04 16:33:58 +0200439
Derek Allard2067d1a2008-11-13 22:59:24 +0000440 return $this->_mcrypt_mode;
441 }
442
443 // --------------------------------------------------------------------
444
445 /**
446 * Set the Hash type
447 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000448 * @param string
Andrey Andreevf4cb94e2012-01-19 15:16:55 +0200449 * @return void
Derek Allard2067d1a2008-11-13 22:59:24 +0000450 */
Greg Akerd1af1852011-12-25 21:59:30 -0600451 public function set_hash($type = 'sha1')
Derek Allard2067d1a2008-11-13 22:59:24 +0000452 {
Daniel Morrisada77752012-10-04 10:24:16 +0100453 $this->_hash_type = in_array($type, hash_algos()) ? $type : 'sha1';
Derek Allard2067d1a2008-11-13 22:59:24 +0000454 }
455
456 // --------------------------------------------------------------------
457
458 /**
459 * Hash encode a string
460 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000461 * @param string
462 * @return string
Barry Mienydd671972010-10-04 16:33:58 +0200463 */
Greg Akerd1af1852011-12-25 21:59:30 -0600464 public function hash($str)
Derek Allard2067d1a2008-11-13 22:59:24 +0000465 {
Daniel Morrisa9923f52012-10-03 19:37:09 +0100466 return hash($this->_hash_type, $str);
Derek Allard2067d1a2008-11-13 22:59:24 +0000467 }
Andrey Andreev38d0e932012-04-03 19:27:45 +0300468
Derek Allard2067d1a2008-11-13 22:59:24 +0000469}
470
Derek Allard2067d1a2008-11-13 22:59:24 +0000471/* End of file Encrypt.php */
Andrey Andreev38d0e932012-04-03 19:27:45 +0300472/* Location: ./system/libraries/Encrypt.php */