Fix: Encoding of iteration for 'Extended DES (Crypt)'
This commit is contained in:
@@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Fixed
|
### Fixed
|
||||||
- Error when 'Display name' not set
|
- Error when 'Display name' not set
|
||||||
|
- Encoding of iteration for 'Extended DES (Crypt)'
|
||||||
|
|
||||||
## [4.0.1] - 2018-08-11
|
## [4.0.1] - 2018-08-16
|
||||||
### Fixed
|
### Fixed
|
||||||
- Leftover lines break the admin page
|
- Leftover lines break the admin page
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class CryptExtendedDES extends AbstractCrypt
|
|||||||
while ($number) {
|
while ($number) {
|
||||||
$rem = $number % $base;
|
$rem = $number % $base;
|
||||||
$number = (int)($number / $base);
|
$number = (int)($number / $base);
|
||||||
$arr[] = $alphabet[$rem];
|
$chars[] = $alphabet[$rem];
|
||||||
}
|
}
|
||||||
|
|
||||||
return str_pad(implode($chars), 4, ".", STR_PAD_RIGHT);
|
return str_pad(implode($chars), 4, ".", STR_PAD_RIGHT);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class CryptExtendedDESTest extends TestCase
|
|||||||
public function testCheckPassword()
|
public function testCheckPassword()
|
||||||
{
|
{
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
$this->crypto->checkPassword("password", "..UZoIyj/Hy/c")
|
$this->crypto->checkPassword("password", "cDRpdxPmHpzS.")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user