Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function generate(string $username, string $password): ResponseInterface |
||
26 | { |
||
27 | $this->init(); |
||
28 | |||
29 | $this->outputLogger->output(Ansi::clear(), true); |
||
30 | $this->outputLogger->output(Ansi::sgr(__METHOD__, [Sgr::BOLD]), true); |
||
31 | $this->outputLogger->output(''); |
||
32 | |||
33 | $hash = \hash('sha256', \sprintf('%s:%s', \trim($username), \md5(\trim($password)))); |
||
34 | |||
35 | $this->outputLogger->output(Ansi::sgr('Success!', [Sgr::GREEN]), false); |
||
36 | $this->outputLogger->output(' Your hash is:', true); |
||
37 | $this->outputLogger->output(''); |
||
38 | $this->outputLogger->output($hash, true); |
||
39 | $this->outputLogger->output(''); |
||
40 | return new Response(); |
||
41 | } |
||
43 |