Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
28 | 4 | public static function decode_password($encoded = '') { |
|
29 | 4 | $literals = explode(' ', wordwrap($encoded, 2, ' ', 2)); |
|
30 | 4 | $length = count($literals); |
|
31 | 4 | $pass = ''; |
|
32 | 4 | ||
33 | 4 | for ($i = 0; $i < $length; $i++) { |
|
34 | $pass .= chr(hexdec($literals[$i]) - $i); |
||
35 | 4 | } |
|
36 | return $pass; |
||
37 | } |
||
38 | } |