public function loadPrivateKey(PrivateKeyConfiguration $key) : PrivateKey
    {
        if ($key->isFile()) {
            $privateKey = File::getFileContents($key->getFilePath());
        } else {
            $privateKey = $key->getContents();
        }

        return PrivateKey::create($privateKey, $key->getPassPhrase());
    }
public function loadPrivateKey(PrivateKeyConfiguration $key) : PrivateKey
    {
        if ($key->isFile()) {
            $privateKey = File::getFileContents($key->getFilePath());
        } else {
            $privateKey = $key->getContents();
        }

        return PrivateKey::create($privateKey, $key->getPassPhrase());
    }
public function loadPrivateKey ( PrivateKeyConfiguration $ key ) : PrivateKey { if ( $ key -> isFile ( ) ) { $ privateKey = File :: getFileContents ( $ key -> getFilePath ( ) ) ; } else { $ privateKey = $ key -> getContents ( ) ; } return PrivateKey :: create ( $ privateKey , $ key -> getPassPhrase ( ) ) ; }
Loads a private key based on the configuration given.

@param \SAML2\Configuration\PrivateKey $key
@return \SAML2\Certificate\PrivateKey
Loads a private key based on the configuration given .