public function getRsaPublicKey()
    {
        if ($this->rsaPublicKey) {
            return $this->rsaPublicKey;
        }

        if (!file_exists($this->rsaPublicKeyFile)) {
            throw new CredentialsException('Could not read the public key file.');
        }

        $this->rsaPublicKey = openssl_get_publickey(file_get_contents($this->rsaPublicKeyFile));

        if (!$this->rsaPublicKey) {
            throw new CredentialsException('Cannot access public key for signing');
        }

        return $this->rsaPublicKey;
    }
public function getRsaPublicKey()
    {
        if ($this->rsaPublicKey) {
            return $this->rsaPublicKey;
        }

        if (!file_exists($this->rsaPublicKeyFile)) {
            throw new CredentialsException('Could not read the public key file.');
        }

        $this->rsaPublicKey = openssl_get_publickey(file_get_contents($this->rsaPublicKeyFile));

        if (!$this->rsaPublicKey) {
            throw new CredentialsException('Cannot access public key for signing');
        }

        return $this->rsaPublicKey;
    }
public function getRsaPublicKey ( ) { if ( $ this -> rsaPublicKey ) { return $ this -> rsaPublicKey ; } if ( ! file_exists ( $ this -> rsaPublicKeyFile ) ) { throw new CredentialsException ( 'Could not read the public key file.' ) ; } $ this -> rsaPublicKey = openssl_get_publickey ( file_get_contents ( $ this -> rsaPublicKeyFile ) ) ; if ( ! $ this -> rsaPublicKey ) { throw new CredentialsException ( 'Cannot access public key for signing' ) ; } return $ this -> rsaPublicKey ; }
Gets the RSA public key.

@throws CredentialsException when the key could not be loaded.

@return resource
Gets the RSA public key .