src/Config/ConfigConsistency.php
public function createRSAPrivateKey()
    {
        $path = $this->getConfig()->getPrivateKeyFilePath();
        $this->createDir($path);
        $this->getConfig()->setPrivateKey((new RsaKeyGen())->createPrivateKey());

        if (@file_put_contents($path, $this->getConfig()->getPrivateKey()) === false) {
            throw new \Exception('Error when writing the RSA private key');
        }
    }
public function createRSAPrivateKey()
    {
        $path = $this->getConfig()->getPrivateKeyFilePath();
        $this->createDir($path);
        $this->getConfig()->setPrivateKey((new RsaKeyGen())->createPrivateKey());

        if (@file_put_contents($path, $this->getConfig()->getPrivateKey()) === false) {
            throw new \Exception('Error when writing the RSA private key');
        }
    }
public function createRSAPrivateKey ( ) { $ path = $ this -> getConfig ( ) -> getPrivateKeyFilePath ( ) ; $ this -> createDir ( $ path ) ; $ this -> getConfig ( ) -> setPrivateKey ( ( new RsaKeyGen ( ) ) -> createPrivateKey ( ) ) ; if ( @ file_put_contents ( $ path , $ this -> getConfig ( ) -> getPrivateKey ( ) ) === false ) { throw new \ Exception ( 'Error when writing the RSA private key' ) ; } }
Create and write the RSA private file

@throws \Exception
Create and write the RSA private file