public function createPrivateKey()
    {
        $rsa = new RSA();
        $rsa->setPrivateKeyFormat(RSA::PRIVATE_FORMAT_PKCS1);

        return $rsa->createKey($this->getPrivateKeySize())['privatekey'];
    }
public function createPrivateKey()
    {
        $rsa = new RSA();
        $rsa->setPrivateKeyFormat(RSA::PRIVATE_FORMAT_PKCS1);

        return $rsa->createKey($this->getPrivateKeySize())['privatekey'];
    }
public function createPrivateKey ( ) { $ rsa = new RSA ( ) ; $ rsa -> setPrivateKeyFormat ( RSA :: PRIVATE_FORMAT_PKCS1 ) ; return $ rsa -> createKey ( $ this -> getPrivateKeySize ( ) ) [ 'privatekey' ] ; }
Create a RSA private key

@return string
Create a RSA private key