summaryrefslogtreecommitdiff
path: root/_test/cases/inc/auth_password.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_test/cases/inc/auth_password.test.php')
-rw-r--r--_test/cases/inc/auth_password.test.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php
index 140c7c23e..8646e3226 100644
--- a/_test/cases/inc/auth_password.test.php
+++ b/_test/cases/inc/auth_password.test.php
@@ -18,6 +18,8 @@ class auth_password_test extends UnitTestCase {
'kmd5' => 'a579299436d7969791189acadd86fcb716',
'pmd5' => '$P$abcdefgh1RC6Fd32heUzl7EYCG9uGw.',
'hmd5' => '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.',
+ 'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158',
+ 'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678',
);
@@ -37,6 +39,16 @@ class auth_password_test extends UnitTestCase {
}
}
+ function test_verifySelf(){
+ foreach($this->passes as $method => $hash){
+ $info = "testing method $method";
+ $this->signal('failinfo',$info);
+
+ $hash = auth_cryptPassword('foo'.$method);
+ $this->assertTrue(auth_verifyPassword('foo'.$method,$hash));
+ }
+ }
+
function test_verifyPassword_nohash(){
$this->assertTrue(auth_verifyPassword('foo','$1$$n1rTiFE0nRifwV/43bVon/'));
}