diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-10-14 16:39:36 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-10-14 16:39:36 +0200 |
commit | e0dd04a6493f1b7f7133f75c08f9ea55ee8bd50a (patch) | |
tree | 48e82c7ea074a380b034bf1543face1134a68bf6 /_test | |
parent | 7ae6f87a6c547c0bed9f52e628c050551529259a (diff) | |
download | rpg-e0dd04a6493f1b7f7133f75c08f9ea55ee8bd50a.tar.gz rpg-e0dd04a6493f1b7f7133f75c08f9ea55ee8bd50a.tar.bz2 |
Added bcrypt support for password hashes
This method require PHP 5.3+ it will fail otherwise!
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/inc/auth_password.test.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index 928552a14..6fe564e73 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -48,6 +48,11 @@ class auth_password_test extends UnitTestCase { } } + function test_bcrypt_self(){ + $hash = auth_cryptPassword('foobcrypt','bcrypt'); + $this->assertTrue(auth_verifyPassword('foobcrypt',$hash)); + } + function test_verifyPassword_nohash(){ $this->assertTrue(auth_verifyPassword('foo','$1$$n1rTiFE0nRifwV/43bVon/')); } |