blob: 17437c1cad09f0f8728f3070ddf4e812cd94966a [file] [log] [blame]
Andrey Andreev7c251b32011-12-27 16:37:23 +02001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
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
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2008 - 2012, 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 */
27
Derek Allard2067d1a2008-11-13 22:59:24 +000028/**
29 * CodeIgniter Encryption Class
30 *
31 * Provides two-way keyed encoding using XOR Hashing and Mcrypt
32 *
33 * @package CodeIgniter
34 * @subpackage Libraries
35 * @category Libraries
Derek Jonesf4a4bd82011-10-20 12:18:42 -050036 * @author EllisLab Dev Team
Derek Allard2067d1a2008-11-13 22:59:24 +000037 * @link http://codeigniter.com/user_guide/libraries/encryption.html
38 */
39class CI_Encrypt {
40
Timothy Warren0688ac92012-04-20 10:25:04 -040041 /**
42 * Reference to the user's encryption key
43 *
44 * @var string
45 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030046 public $encryption_key = '';
Timothy Warren0688ac92012-04-20 10:25:04 -040047
48 /**
49 * Type of hash operation
50 *
51 * @var string
52 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030053 protected $_hash_type = 'sha1';
Timothy Warren0688ac92012-04-20 10:25:04 -040054
55 /**
56 * Flag for the existance of mcrypt
57 *
58 * @var bool
59 */
Andrey Andreev38d0e932012-04-03 19:27:45 +030060 protected $_mcrypt_exists = FALSE;
Timothy Warren0688ac92012-04-20 10:25:04 -040061
62 /**
63 * Current cipher to be used with mcrypt
64 *
65 * @var string
66 */
Greg Akerd1af1852011-12-25 21:59:30 -060067 protected $_mcrypt_cipher;
Timothy Warren0688ac92012-04-20 10:25:04 -040068
69 /**
70 * Method for encrypting/decrypting data
71 *
72 * @var int
73 */
Greg Akerd1af1852011-12-25 21:59:30 -060074 protected $_mcrypt_mode;
Derek Allard2067d1a2008-11-13 22:59:24 +000075
Timothy Warren0688ac92012-04-20 10:25:04 -040076 /**
77 * Initialize Encryption class
78 */
Greg Akera9263282010-11-10 15:26:43 -060079 public function __construct()
Derek Allard2067d1a2008-11-13 22:59:24 +000080 {
Andrey Andreev38d0e932012-04-03 19:27:45 +030081 $this->_mcrypt_exists = function_exists('mcrypt_encrypt');
Andrey Andreevcc6dbda2012-01-08 06:35:17 +020082 log_message('debug', 'Encrypt Class Initialized');
Derek Allard2067d1a2008-11-13 22:59:24 +000083 }
84
85 // --------------------------------------------------------------------
86
87 /**
88 * Fetch the encryption key
89 *
90 * Returns it as MD5 in order to have an exact-length 128 bit key.
91 * Mcrypt is sensitive to keys that are not the correct length
92 *
Derek Allard2067d1a2008-11-13 22:59:24 +000093 * @param string
94 * @return string
95 */
Greg Akerd1af1852011-12-25 21:59:30 -060096 public function get_key($key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +000097 {
98 if ($key == '')
99 {
100 if ($this->encryption_key != '')
101 {
102 return $this->encryption_key;
103 }
104
105 $CI =& get_instance();
106 $key = $CI->config->item('encryption_key');
107
Greg Akerd1af1852011-12-25 21:59:30 -0600108 if ($key === FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000109 {
110 show_error('In order to use the encryption class requires that you set an encryption key in your config file.');
111 }
112 }
113
114 return md5($key);
115 }
116
117 // --------------------------------------------------------------------
118
119 /**
120 * Set the encryption key
121 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000122 * @param string
Andrey Andreevcc6dbda2012-01-08 06:35:17 +0200123 * @return object
Derek Allard2067d1a2008-11-13 22:59:24 +0000124 */
Greg Akerd1af1852011-12-25 21:59:30 -0600125 public function set_key($key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000126 {
127 $this->encryption_key = $key;
Greg Akerd1af1852011-12-25 21:59:30 -0600128 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000129 }
130
131 // --------------------------------------------------------------------
132
133 /**
134 * Encode
135 *
136 * Encodes the message string using bitwise XOR encoding.
137 * The key is combined with a random hash, and then it
138 * too gets converted using XOR. The whole thing is then run
139 * through mcrypt (if supported) using the randomized key.
140 * The end result is a double-encrypted message string
141 * that is randomized with each call to this function,
142 * even if the supplied message and key are the same.
143 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000144 * @param string the string to encode
145 * @param string the key
146 * @return string
147 */
Greg Akerd1af1852011-12-25 21:59:30 -0600148 public function encode($string, $key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000149 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200150 $method = ($this->_mcrypt_exists === TRUE) ? 'mcrypt_encode' : '_xor_encode';
151 return base64_encode($this->$method($string, $this->get_key($key)));
Derek Allard2067d1a2008-11-13 22:59:24 +0000152 }
153
154 // --------------------------------------------------------------------
155
156 /**
157 * Decode
158 *
159 * Reverses the above process
160 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000161 * @param string
162 * @param string
163 * @return string
164 */
Greg Akerd1af1852011-12-25 21:59:30 -0600165 public function decode($string, $key = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000166 {
Derek Allard2067d1a2008-11-13 22:59:24 +0000167 if (preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
168 {
169 return FALSE;
170 }
171
Andrey Andreev7c251b32011-12-27 16:37:23 +0200172 $method = ($this->_mcrypt_exists === TRUE) ? 'mcrypt_decode' : '_xor_decode';
173 return $this->$method(base64_decode($string), $this->get_key($key));
Derek Allard2067d1a2008-11-13 22:59:24 +0000174 }
175
176 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200177
Derek Jones09c77932010-08-31 13:17:10 -0500178 /**
179 * Encode from Legacy
180 *
181 * Takes an encoded string from the original Encryption class algorithms and
182 * returns a newly encoded string using the improved method added in 2.0.0
183 * This allows for backwards compatibility and a method to transition to the
184 * new encryption algorithms.
Barry Mienydd671972010-10-04 16:33:58 +0200185 *
Derek Jones09c77932010-08-31 13:17:10 -0500186 * For more details, see http://codeigniter.com/user_guide/installation/upgrade_200.html#encryption
187 *
Derek Jones09c77932010-08-31 13:17:10 -0500188 * @param string
189 * @param int (mcrypt mode constant)
190 * @param string
191 * @return string
192 */
Greg Akerd1af1852011-12-25 21:59:30 -0600193 public function encode_from_legacy($string, $legacy_mode = MCRYPT_MODE_ECB, $key = '')
Derek Jones09c77932010-08-31 13:17:10 -0500194 {
195 if ($this->_mcrypt_exists === FALSE)
196 {
197 log_message('error', 'Encoding from legacy is available only when Mcrypt is in use.');
198 return FALSE;
199 }
Andrey Andreev7c251b32011-12-27 16:37:23 +0200200 elseif (preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
201 {
202 return FALSE;
203 }
Barry Mienydd671972010-10-04 16:33:58 +0200204
Derek Jones09c77932010-08-31 13:17:10 -0500205 // decode it first
206 // set mode temporarily to what it was when string was encoded with the legacy
Barry Mienydd671972010-10-04 16:33:58 +0200207 // algorithm - typically MCRYPT_MODE_ECB
Derek Jones09c77932010-08-31 13:17:10 -0500208 $current_mode = $this->_get_mode();
209 $this->set_mode($legacy_mode);
Barry Mienydd671972010-10-04 16:33:58 +0200210
Derek Jones09c77932010-08-31 13:17:10 -0500211 $key = $this->get_key($key);
Derek Jones09c77932010-08-31 13:17:10 -0500212 $dec = base64_decode($string);
Derek Jones09c77932010-08-31 13:17:10 -0500213 if (($dec = $this->mcrypt_decode($dec, $key)) === FALSE)
214 {
215 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 /**
230 * XOR Encode
231 *
232 * Takes a plain-text string and key as input and generates an
233 * encoded bit-string using XOR
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_encode($string, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000240 {
241 $rand = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200242 do
Derek Allard2067d1a2008-11-13 22:59:24 +0000243 {
244 $rand .= mt_rand(0, mt_getrandmax());
245 }
Andrey Andreev7c251b32011-12-27 16:37:23 +0200246 while (strlen($rand) < 32);
Derek Allard2067d1a2008-11-13 22:59:24 +0000247
248 $rand = $this->hash($rand);
249
250 $enc = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200251 for ($i = 0, $ls = strlen($string), $lr = strlen($rand); $i < $ls; $i++)
Barry Mienydd671972010-10-04 16:33:58 +0200252 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200253 $enc .= $rand[($i % $lr)].($rand[($i % $lr)] ^ $string[$i]);
Derek Allard2067d1a2008-11-13 22:59:24 +0000254 }
255
256 return $this->_xor_merge($enc, $key);
257 }
258
259 // --------------------------------------------------------------------
260
261 /**
262 * XOR Decode
263 *
264 * Takes an encoded string and key as input and generates the
265 * plain-text original message
266 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000267 * @param string
268 * @param string
269 * @return string
270 */
Greg Akerd1af1852011-12-25 21:59:30 -0600271 protected function _xor_decode($string, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000272 {
273 $string = $this->_xor_merge($string, $key);
274
275 $dec = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200276 for ($i = 0, $l = strlen($string); $i < $l; $i++)
Derek Allard2067d1a2008-11-13 22:59:24 +0000277 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200278 $dec .= ($string[$i++] ^ $string[$i]);
Derek Allard2067d1a2008-11-13 22:59:24 +0000279 }
280
281 return $dec;
282 }
283
284 // --------------------------------------------------------------------
285
286 /**
287 * XOR key + string Combiner
288 *
289 * Takes a string and key as input and computes the difference using XOR
290 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000291 * @param string
292 * @param string
293 * @return string
294 */
Greg Akerd1af1852011-12-25 21:59:30 -0600295 protected function _xor_merge($string, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000296 {
297 $hash = $this->hash($key);
298 $str = '';
Andrey Andreev7c251b32011-12-27 16:37:23 +0200299 for ($i = 0, $ls = strlen($string), $lh = strlen($hash); $i < $ls; $i++)
Derek Allard2067d1a2008-11-13 22:59:24 +0000300 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200301 $str .= $string[$i] ^ $hash[($i % $lh)];
Derek Allard2067d1a2008-11-13 22:59:24 +0000302 }
303
304 return $str;
305 }
306
307 // --------------------------------------------------------------------
308
309 /**
310 * Encrypt using Mcrypt
311 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000312 * @param string
313 * @param string
314 * @return string
315 */
Greg Akerd1af1852011-12-25 21:59:30 -0600316 public function mcrypt_encode($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000317 {
318 $init_size = mcrypt_get_iv_size($this->_get_cipher(), $this->_get_mode());
319 $init_vect = mcrypt_create_iv($init_size, MCRYPT_RAND);
320 return $this->_add_cipher_noise($init_vect.mcrypt_encrypt($this->_get_cipher(), $key, $data, $this->_get_mode(), $init_vect), $key);
321 }
322
323 // --------------------------------------------------------------------
324
325 /**
326 * Decrypt using Mcrypt
327 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000328 * @param string
329 * @param string
330 * @return string
331 */
Greg Akerd1af1852011-12-25 21:59:30 -0600332 public function mcrypt_decode($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000333 {
334 $data = $this->_remove_cipher_noise($data, $key);
335 $init_size = mcrypt_get_iv_size($this->_get_cipher(), $this->_get_mode());
336
337 if ($init_size > strlen($data))
338 {
339 return FALSE;
340 }
341
342 $init_vect = substr($data, 0, $init_size);
343 $data = substr($data, $init_size);
344 return rtrim(mcrypt_decrypt($this->_get_cipher(), $key, $data, $this->_get_mode(), $init_vect), "\0");
345 }
346
347 // --------------------------------------------------------------------
348
349 /**
350 * Adds permuted noise to the IV + encrypted data to protect
351 * against Man-in-the-middle attacks on CBC mode ciphers
352 * http://www.ciphersbyritter.com/GLOSSARY.HTM#IV
353 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000354 * @param string
355 * @param string
356 * @return string
357 */
Greg Akerd1af1852011-12-25 21:59:30 -0600358 protected function _add_cipher_noise($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000359 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200360 $key = $this->hash($key);
Derek Allard2067d1a2008-11-13 22:59:24 +0000361 $str = '';
362
Andrey Andreev7c251b32011-12-27 16:37:23 +0200363 for ($i = 0, $j = 0, $ld = strlen($data), $lk = strlen($key); $i < $ld; ++$i, ++$j)
Derek Allard2067d1a2008-11-13 22:59:24 +0000364 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200365 if ($j >= $lk)
Derek Allard2067d1a2008-11-13 22:59:24 +0000366 {
367 $j = 0;
368 }
369
Andrey Andreev7c251b32011-12-27 16:37:23 +0200370 $str .= chr((ord($data[$i]) + ord($key[$j])) % 256);
Derek Allard2067d1a2008-11-13 22:59:24 +0000371 }
372
373 return $str;
374 }
375
376 // --------------------------------------------------------------------
377
378 /**
379 * Removes permuted noise from the IV + encrypted data, reversing
380 * _add_cipher_noise()
381 *
382 * Function description
383 *
Timothy Warren0688ac92012-04-20 10:25:04 -0400384 * @param string $data
385 * @param string $key
Andrey Andreev38d0e932012-04-03 19:27:45 +0300386 * @return string
Derek Allard2067d1a2008-11-13 22:59:24 +0000387 */
Greg Akerd1af1852011-12-25 21:59:30 -0600388 protected function _remove_cipher_noise($data, $key)
Derek Allard2067d1a2008-11-13 22:59:24 +0000389 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200390 $key = $this->hash($key);
Derek Allard2067d1a2008-11-13 22:59:24 +0000391 $str = '';
392
Andrey Andreev7c251b32011-12-27 16:37:23 +0200393 for ($i = 0, $j = 0, $ld = strlen($data), $lk = strlen($key); $i < $ld; ++$i, ++$j)
Derek Allard2067d1a2008-11-13 22:59:24 +0000394 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200395 if ($j >= $lk)
Derek Allard2067d1a2008-11-13 22:59:24 +0000396 {
397 $j = 0;
398 }
399
Andrey Andreev7c251b32011-12-27 16:37:23 +0200400 $temp = ord($data[$i]) - ord($key[$j]);
Derek Allard2067d1a2008-11-13 22:59:24 +0000401
402 if ($temp < 0)
403 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200404 $temp += 256;
Derek Allard2067d1a2008-11-13 22:59:24 +0000405 }
Barry Mienydd671972010-10-04 16:33:58 +0200406
Derek Allard2067d1a2008-11-13 22:59:24 +0000407 $str .= chr($temp);
408 }
409
410 return $str;
411 }
412
413 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200414
Derek Allard2067d1a2008-11-13 22:59:24 +0000415 /**
416 * Set the Mcrypt Cipher
417 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300418 * @param int
419 * @return object
Derek Allard2067d1a2008-11-13 22:59:24 +0000420 */
Greg Akerd1af1852011-12-25 21:59:30 -0600421 public function set_cipher($cipher)
Derek Allard2067d1a2008-11-13 22:59:24 +0000422 {
423 $this->_mcrypt_cipher = $cipher;
Greg Akerd1af1852011-12-25 21:59:30 -0600424 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000425 }
426
427 // --------------------------------------------------------------------
428
429 /**
430 * Set the Mcrypt Mode
431 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300432 * @param int
433 * @return object
Derek Allard2067d1a2008-11-13 22:59:24 +0000434 */
Andrey Andreev7c251b32011-12-27 16:37:23 +0200435 public function set_mode($mode)
Derek Allard2067d1a2008-11-13 22:59:24 +0000436 {
437 $this->_mcrypt_mode = $mode;
Greg Akerd1af1852011-12-25 21:59:30 -0600438 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000439 }
440
441 // --------------------------------------------------------------------
442
443 /**
444 * Get Mcrypt cipher Value
445 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300446 * @return int
Derek Allard2067d1a2008-11-13 22:59:24 +0000447 */
Greg Akerd1af1852011-12-25 21:59:30 -0600448 protected function _get_cipher()
Derek Allard2067d1a2008-11-13 22:59:24 +0000449 {
450 if ($this->_mcrypt_cipher == '')
451 {
Andrey Andreevd655a992012-01-10 22:31:29 +0200452 return $this->_mcrypt_cipher = MCRYPT_RIJNDAEL_256;
Derek Allard2067d1a2008-11-13 22:59:24 +0000453 }
454
455 return $this->_mcrypt_cipher;
456 }
457
458 // --------------------------------------------------------------------
459
460 /**
461 * Get Mcrypt Mode Value
462 *
Andrey Andreev38d0e932012-04-03 19:27:45 +0300463 * @return int
Derek Allard2067d1a2008-11-13 22:59:24 +0000464 */
Greg Akerd1af1852011-12-25 21:59:30 -0600465 protected function _get_mode()
Derek Allard2067d1a2008-11-13 22:59:24 +0000466 {
467 if ($this->_mcrypt_mode == '')
468 {
Andrey Andreevd655a992012-01-10 22:31:29 +0200469 return $this->_mcrypt_mode = MCRYPT_MODE_CBC;
Derek Allard2067d1a2008-11-13 22:59:24 +0000470 }
Barry Mienydd671972010-10-04 16:33:58 +0200471
Derek Allard2067d1a2008-11-13 22:59:24 +0000472 return $this->_mcrypt_mode;
473 }
474
475 // --------------------------------------------------------------------
476
477 /**
478 * Set the Hash type
479 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000480 * @param string
Andrey Andreevf4cb94e2012-01-19 15:16:55 +0200481 * @return void
Derek Allard2067d1a2008-11-13 22:59:24 +0000482 */
Greg Akerd1af1852011-12-25 21:59:30 -0600483 public function set_hash($type = 'sha1')
Derek Allard2067d1a2008-11-13 22:59:24 +0000484 {
Andrey Andreevcc6dbda2012-01-08 06:35:17 +0200485 $this->_hash_type = ($type !== 'sha1' && $type !== 'md5') ? 'sha1' : $type;
Derek Allard2067d1a2008-11-13 22:59:24 +0000486 }
487
488 // --------------------------------------------------------------------
489
490 /**
491 * Hash encode a string
492 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000493 * @param string
494 * @return string
Barry Mienydd671972010-10-04 16:33:58 +0200495 */
Greg Akerd1af1852011-12-25 21:59:30 -0600496 public function hash($str)
Derek Allard2067d1a2008-11-13 22:59:24 +0000497 {
Andrey Andreev7c251b32011-12-27 16:37:23 +0200498 return ($this->_hash_type === 'sha1') ? sha1($str) : md5($str);
Derek Allard2067d1a2008-11-13 22:59:24 +0000499 }
Andrey Andreev38d0e932012-04-03 19:27:45 +0300500
Derek Allard2067d1a2008-11-13 22:59:24 +0000501}
502
Derek Allard2067d1a2008-11-13 22:59:24 +0000503/* End of file Encrypt.php */
Andrey Andreev38d0e932012-04-03 19:27:45 +0300504/* Location: ./system/libraries/Encrypt.php */