Test getPasswordHash() methods
This commit is contained in:
@@ -43,6 +43,12 @@ class CleartextTest extends TestCase
|
||||
$this->assertTrue($this->crypto->checkPassword("password", "password"));
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class CourierMD5RawTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class CourierMD5Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class CourierSHA1Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CourierSHA256Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CryptArgon2Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CryptBlowfishTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -45,6 +45,12 @@ class CryptExtendedDESTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class CryptMD5Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CryptSHA256Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CryptSHA512Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -45,6 +45,12 @@ class CryptStandardDESTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class CryptTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class JoomlaTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class MD5Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class PhpassTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -47,6 +47,12 @@ class SHA1Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class SHA512WhirlpoolTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class SSHA256Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -48,6 +48,12 @@ class SSHA512Test extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testPasswordHash()
|
||||
{
|
||||
$hash = $this->crypto->getPasswordHash("password");
|
||||
$this->assertTrue($this->crypto->checkPassword("password", $hash));
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Reference in New Issue
Block a user