Skip to content
Browse files

Move Simplecrypt to legacy and make it autoloadable.

  • Loading branch information...
1 parent 78677f9 commit 5a2752cf34f655cbcb6c30df756e705e5fac7c02 @realityking committed Apr 9, 2012
View
1 libraries/import.legacy.php
@@ -61,5 +61,6 @@ class_exists('JLoader') or die;
JLoader::register('JDatabaseQuerySQLAzure', JPATH_PLATFORM . '/joomla/database/query/sqlazure.php');
JLoader::register('JDatabaseQuerySQLSrv', JPATH_PLATFORM . '/joomla/database/query/sqlsrv.php');
JLoader::register('JToolBar', JPATH_PLATFORM . '/legacy/toolbar/toolbar.php');
+JLoader::register('JSimpleCrypt', JPATH_PLATFORM . '/legacy/simplecrypt/simplecrypt.php');
JLoader::register('JTree', JPATH_PLATFORM . '/legacy/base/tree.php');
JLoader::register('JNode', JPATH_PLATFORM . '/legacy/base/node.php');
View
2 libraries/legacy/application/application.php
@@ -668,8 +668,6 @@ public function login($credentials, $options = array())
// Set the remember me cookie if enabled.
if (isset($options['remember']) && $options['remember'])
{
- jimport('joomla.utilities.simplecrypt');
-
// Create the encryption key, apply extra hardening using the user agent string.
$key = self::getHash(@$_SERVER['HTTP_USER_AGENT']);
View
8 libraries/joomla/utilities/simplecrypt.php → libraries/legacy/simplecrypt/simplecrypt.php
@@ -1,7 +1,7 @@
<?php
/**
* @package Joomla.Platform
- * @subpackage Utilities
+ * @subpackage Simplecrypt
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
@@ -13,11 +13,11 @@
* JSimpleCrypt is a very simple encryption algorithm for encrypting/decrypting strings
*
* @package Joomla.Platform
- * @subpackage Utilities
+ * @subpackage Simplecrypt
* @since 11.1
- * @deprecated 12.3
+ * @deprecated 12.3 Use JCrypt instead.
*/
-class JSimpleCrypt
+class JSimplecrypt
{
/**
* Encryption/Decryption Key
View
10 ...nit/joomla/utilities/JSimpleCryptTest.php → ...s/legacy/simplecrypt/JSimpleCryptTest.php
@@ -1,20 +1,20 @@
<?php
/**
* @package Joomla.UnitTest
- * @subpackage Utilities
+ * @subpackage Simplecrypt
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
-require_once JPATH_PLATFORM.'/joomla/utilities/simplecrypt.php';
+require_once JPATH_PLATFORM.'/legacy/simplecrypt/simplecrypt.php';
/**
* Test class for JSimpleCrypt.
* Generated by PHPUnit on 2009-10-26 at 22:30:43.
*
- * @package Joomla.UnitTest
- * @subpackage Utilities
+ * @package Joomla.UnitTest
+ * @subpackage Simplecrypt
*/
class JSimpleCryptTest extends TestCase
{
@@ -94,6 +94,7 @@ function casesEncryption()
*
* @return void
* @dataProvider casesEncryption
+ * @covers JSimpleCrypt::decrypt
*/
public function testDecrypt( $expected, $key, $text )
{
@@ -122,6 +123,7 @@ public function testDecrypt( $expected, $key, $text )
*
* @return void
* @dataProvider casesEncryption
+ * @covers JSimpleCrypt::encrypt
*/
public function testEncrypt( $text, $key, $expected )
{

0 comments on commit 5a2752c

Please sign in to comment.
Something went wrong with that request. Please try again.