FAQ

svn: /pear/packages/Text_Password/trunk/tests/ Text_Password_Test.php

Martin Jansen
Dec 30, 2011 at 9:06 pm
mj Fri, 30 Dec 2011 21:06:38 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321589

Log:
Dropped pointless test.

Changed paths:
U pear/packages/Text_Password/trunk/tests/Text_Password_Test.php

Modified: pear/packages/Text_Password/trunk/tests/Text_Password_Test.php
===================================================================
--- pear/packages/Text_Password/trunk/tests/Text_Password_Test.php 2011-12-30 17:38:59 UTC (rev 321588)
+++ pear/packages/Text_Password/trunk/tests/Text_Password_Test.php 2011-12-30 21:06:38 UTC (rev 321589)
@@ -70,16 +70,6 @@
$this->assertRegExp("/^[a-z]{8}$/i", $password);
}

- function testTimeToBruteForce()
- {
- $password = Text_Password::create(5, 'unpronounceable');
- $result = $this->_TimeToBruteForce($pass);
-
- $this->assertTrue($result['combination'] == 1);
- $this->assertTrue($result['max'] == 0.00025);
- $this->assertTrue($result['min'] == 0.000125);
- }
-
// {{{ Test cases for creating passwords based on a given login string

function testCreateFromLoginReverse()
@@ -160,19 +150,5 @@
}
}

- function _timeToBruteForce($password, $nbr = 0, $cmbPerSeconde = 4000)
- {
- global $_Text_Password_NumberOfPossibleCharacters;
-
- $nbr = ($nbr == 0) ? $_Text_Password_NumberOfPossibleCharacters : $nbr;
- $cmb = pow($nbr, strlen($password));
- $time_max = $cmb / $cmbPerSeconde;
- $time_min = ($cmb / $cmbPerSeconde) / 2;
-
- return array("combination" => $cmb,
- "max" => $time_max,
- "min" => $time_min);
- }
-
// }}}
}
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›

2 users in discussion

Martin Jansen: 2 posts Daniel O'Connor: 1 post