src/SftpAdapter.php
public function getPrivateKey()
    {
        if ("---" !== substr($this->privateKey, 0, 3) && is_file($this->privateKey)) {
            $this->privateKey = file_get_contents($this->privateKey);
        }

        $key = new RSA();

        if ($password = $this->getPassword()) {
            $key->setPassword($password);
        }

        $key->loadKey($this->privateKey);

        return $key;
    }
public function getPrivateKey()
    {
        if ("---" !== substr($this->privateKey, 0, 3) && is_file($this->privateKey)) {
            $this->privateKey = file_get_contents($this->privateKey);
        }

        $key = new RSA();

        if ($password = $this->getPassword()) {
            $key->setPassword($password);
        }

        $key->loadKey($this->privateKey);

        return $key;
    }
public function getPrivateKey ( ) { if ( "---" !== substr ( $ this -> privateKey , 0 , 3 ) && is_file ( $ this -> privateKey ) ) { $ this -> privateKey = file_get_contents ( $ this -> privateKey ) ; } $ key = new RSA ( ) ; if ( $ password = $ this -> getPassword ( ) ) { $ key -> setPassword ( $ password ) ; } $ key -> loadKey ( $ this -> privateKey ) ; return $ key ; }
Get the private key with the password or private key contents.

@return RSA
Get the private key with the password or private key contents .