@@ 199-202 (lines=4) @@ | ||
196 | $keypair = $this->cryptoInterface->getKeypair(); |
|
197 | $message = ''; |
|
198 | ||
199 | if(is_dir(dirname($privateKeyFile))){ |
|
200 | file_put_contents($privateKeyFile, $keypair->privateKey); |
|
201 | $message .= 'Private key saved to: '.$privateKeyFile.PHP_EOL; |
|
202 | } |
|
203 | ||
204 | if(is_dir(dirname($publicKeyFile))){ |
|
205 | file_put_contents($publicKeyFile, $keypair->publicKey); |
|
@@ 204-207 (lines=4) @@ | ||
201 | $message .= 'Private key saved to: '.$privateKeyFile.PHP_EOL; |
|
202 | } |
|
203 | ||
204 | if(is_dir(dirname($publicKeyFile))){ |
|
205 | file_put_contents($publicKeyFile, $keypair->publicKey); |
|
206 | $message .= 'Public key saved to: '.$publicKeyFile.PHP_EOL; |
|
207 | } |
|
208 | ||
209 | return $message.PHP_EOL.'private:'.$keypair->privateKey.PHP_EOL.'public:'.$keypair->publicKey; |
|
210 | } |