Minor changes
Minor changes

--- /dev/null
+++ b/Upgrade_Scripts/password_schema.php
@@ -1,1 +1,38 @@
+<?php
+/** Update Login passwords using the old schema to bcrypt
+*
+*/
+define('_CREDLOCK',1);
 
+// Load the required libraries
+chdir(dirname(__FILE__)."/../");
+require_once 'lib/Framework/main.php';
+require_once 'lib/crypto.php';
+require_once 'lib/auth.class.php';
+
+
+$crypt = new Crypto;
+$db = new AuthDB;
+
+// Need to set the correct table name
+$sql = "SELECT * FROM #__Logins";
+$db->setQuery($sql);
+$res = $db->loadResults();
+
+foreach ($res as $pass){
+// Need to decrypt the relevant values
+
+$p = explode(":",$pass->password);
+
+$newhash = $auth->blowfishCrypt(md5($p[0].$p1[1]),12);
+
+
+
+}
+
+
+
+
+
+?> 
+

--- a/lib/crypto.php
+++ b/lib/crypto.php
@@ -120,7 +120,7 @@
 	// Originally passed this through substr, not sure why - tired I guess
         $a = ord($str[$i]);
 
-	// Perform a bitwise XOR
+	// Perform a bitwise XOR using both parts of the key
         $b = ($a ^ ord($k[0][$kpos])) ^ ord($k[1][$kpos]);    
         
     
@@ -306,7 +306,7 @@
 
 
 
-function encrypt_doubleROT13(&$string,$type){ return "If you've enabled this, you really shouldn't be in charge of Crypto Settings!"; }
+function encrypt_doubleROT13(&$string,$type){ return base64_decode("SWYgeW91J3ZlIGVuYWJsZWQgdGhpcywgeW91IHJlYWxseSBzaG91bGRuJ3QgYmUgaW4gY2hhcmdlIG9mIENyeXB0byBTZXR0aW5ncyE="); }