| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class RsaTest extends TestCase |
||
| 7 | { |
||
| 8 | protected $rsaTool; |
||
| 9 | |||
| 10 | protected function setUp(): void |
||
| 15 | } |
||
| 16 | |||
| 17 | |||
| 18 | public function testPrivEncryptAndDecrypt() |
||
| 19 | { |
||
| 20 | $data = 'Hello, World!'; |
||
| 21 | $encrypted = $this->rsaTool->privEncrypt($data); |
||
| 22 | $this->assertNotNull($encrypted); |
||
| 23 | |||
| 24 | $decrypted = $this->rsaTool->privDecrypt($encrypted); |
||
| 25 | $this->assertEquals($data, $decrypted); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testPubEncryptAndDecrypt() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |