Index: tags/2.0.1/tests/Auth_FileTest.php
===================================================================
--- tags/2.0.1/tests/Auth_FileTest.php	(revision 125)
+++ tags/2.0.1/tests/Auth_FileTest.php	(revision 126)
@@ -23,5 +23,6 @@
         require dirname(__FILE__) . '/_config.inc.php';
         require_once '../lib/Auth_File.inc.php';
-        $this->Auth_File =& new Auth_File(array('htpasswd_file' => dirname(__FILE__) . '/_test_htpasswd'));
+        $this->Auth_File =& new Auth_File('test');
+        $this->Auth_File->setParam(array('htpasswd_file' => dirname(__FILE__) . '/_test_htpasswd'));
     }
 
@@ -44,5 +45,5 @@
         $result = $this->Auth_File->login('testuser', 'testpass');
         $this->assertTrue($result, 'testuser login failed.');
-        $this->assertTrue($_SESSION['_auth']['authenticated'], 'testuser authentication not found in session.');
+        $this->assertTrue($_SESSION['_auth_test']['authenticated'], 'testuser authentication not found in session.');
     }
 
@@ -51,5 +52,5 @@
         $result = $this->Auth_File->login('testuser', 'testpass');
         $this->Auth_File->clearauth();
-        $this->assertFalse($_SESSION['_auth']['authenticated'], 'testuser authentication not false in session.');
+        $this->assertFalse($_SESSION['_auth_test']['authenticated'], 'testuser authentication not false in session.');
     }
 
Index: tags/2.0.1/tests/Auth_SQLTest.php
===================================================================
--- tags/2.0.1/tests/Auth_SQLTest.php	(revision 125)
+++ tags/2.0.1/tests/Auth_SQLTest.php	(revision 126)
@@ -29,5 +29,6 @@
             'db_login_table'    => 'test_login_tbl',
             'login_url'         => '/login.php',
-            'blocking'          => true
+            'blocking'          => true,
+            'encryption_type' => AUTH_ENCRYPT_SHA1,
         ));
 
@@ -46,5 +47,5 @@
             ) VALUES (
                 'testuser',
-                md5('testpass'),
+                '" . $this->Auth_SQL->encryptpassword('testpass') . "',
                 'John',
                 'Doe',
@@ -185,6 +186,19 @@
     function test_encryptpassword()
     {
+        $this->Auth_SQL->setParam(array('encryption_type' => AUTH_ENCRYPT_MD5));
         $result = $this->Auth_SQL->encryptpassword('123');
         $this->assertEquals('202cb962ac59075b964b07152d234b70', $result);
+
+        $this->Auth_SQL->setParam(array('encryption_type' => AUTH_ENCRYPT_SHA1));
+        $result = $this->Auth_SQL->encryptpassword('123');
+        $this->assertEquals('40bd001563085fc35165329ea1ff5c5ecbdbbeef', $result);
+
+        $this->Auth_SQL->setParam(array('encryption_type' => AUTH_ENCRYPT_PLAINTEXT));
+        $result = $this->Auth_SQL->encryptpassword('123');
+        $this->assertEquals('123', $result);
+
+        $this->Auth_SQL->setParam(array('encryption_type' => AUTH_ENCRYPT_CRYPT));
+        $result = $this->Auth_SQL->encryptpassword('123', 'saltstring');
+        $this->assertEquals('saEZ6MlWYV9nQ', $result);
     }
 
@@ -197,5 +211,5 @@
         ");
         list($pass) = mysql_fetch_row($qid);
-        $this->assertEquals('202cb962ac59075b964b07152d234b70', $pass);
+        $this->assertEquals('40bd001563085fc35165329ea1ff5c5ecbdbbeef', $pass);
     }
 
Index: tags/2.0.1/tests/RecordLockTest.php
===================================================================
--- tags/2.0.1/tests/RecordLockTest.php	(revision 125)
+++ tags/2.0.1/tests/RecordLockTest.php	(revision 126)
@@ -49,5 +49,5 @@
             ) VALUES (
                 'testuser',
-                md5('testpass'),
+                '" . $this->Auth_SQL->encryptpassword('testpass') . "',
                 'John',
                 'Doe',
@@ -56,5 +56,7 @@
             )
         ");
-        $this->Auth_SQL->login('testuser', 'testpass');
+        if (!$this->Auth_SQL->login('testuser', 'testpass')) {
+            trigger_error('Test user not logged in.', E_USER_WARNING);
+        }
 
         $this->RecordLock =& RecordLock::getInstance($this->Auth_SQL);
Index: tags/2.0.1/tests/_config.inc.php
===================================================================
--- tags/2.0.1/tests/_config.inc.php	(revision 125)
+++ tags/2.0.1/tests/_config.inc.php	(revision 126)
@@ -29,4 +29,5 @@
     'log_screen_priority' => LOG_WARNING,
     'error_reporting' => E_ALL,
+    'signing_key' => 'atestsaltkey',
 ));
 
Index: tags/2.0.1/tests/run_tests.sh
===================================================================
--- tags/2.0.1/tests/run_tests.sh	(revision 125)
+++ tags/2.0.1/tests/run_tests.sh	(revision 126)
@@ -7,4 +7,4 @@
 for foo in *Test.php; 
 do
-    /usr/local/bin/php $foo;
+    php4 $foo;
 done;
