From 4c3cc152c81af57ec0a25bfee5da4964309a3aa5 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 20 Mar 2011 22:52:31 +0100 Subject: [ticket/10101] Add test case for native phpass hashes PHPBB3-10101 --- tests/security/hash_test.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/security/hash_test.php (limited to 'tests/security/hash_test.php') diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php new file mode 100644 index 0000000000..19a3822145 --- /dev/null +++ b/tests/security/hash_test.php @@ -0,0 +1,21 @@ +assertTrue(phpbb_check_hash('test', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1')); + $this->assertTrue(phpbb_check_hash('test', '$P$9isfrtKXWqrz8PvztXlL3.daw4U0zI1')); + $this->assertFalse(phpbb_check_hash('foo', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1')); + } +} + -- cgit v1.2.1