| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | protected function doRun() { |
||
| 21 | $cryptTool = CryptTool::getInstance(); |
||
| 22 | $keyPair = $cryptTool->generateKeyPair(); |
||
| 23 | |||
| 24 | $privateKeyHex = $cryptTool->bin2hex($keyPair->privateKey); |
||
| 25 | $publicKeyHex = $cryptTool->bin2hex($keyPair->publicKey); |
||
| 26 | |||
| 27 | file_put_contents($this->getArgument(self::argPrivateKeyFile), Common::convertPrivateKey($privateKeyHex)."\n"); |
||
| 28 | file_put_contents($this->getArgument(self::argPublicKeyFile), Common::convertPublicKey($publicKeyHex)."\n"); |
||
| 29 | |||
| 30 | Common::l('key pair generated'); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |