public static function createKeyDescriptor(string $x509Data) : KeyDescriptor
    {
        $x509Certificate = new X509Certificate();
        $x509Certificate->setCertificate($x509Data);

        $x509Data = new X509Data();
        $x509Data->addData($x509Certificate);

        $keyInfo = new KeyInfo();
        $keyInfo->addInfo($x509Data);

        $keyDescriptor = new KeyDescriptor();
        $keyDescriptor->setKeyInfo($keyInfo);

        return $keyDescriptor;
    }
public static function createKeyDescriptor(string $x509Data) : KeyDescriptor
    {
        $x509Certificate = new X509Certificate();
        $x509Certificate->setCertificate($x509Data);

        $x509Data = new X509Data();
        $x509Data->addData($x509Certificate);

        $keyInfo = new KeyInfo();
        $keyInfo->addInfo($x509Data);

        $keyDescriptor = new KeyDescriptor();
        $keyDescriptor->setKeyInfo($keyInfo);

        return $keyDescriptor;
    }
public static function createKeyDescriptor ( string $ x509Data ) : KeyDescriptor { $ x509Certificate = new X509Certificate ( ) ; $ x509Certificate -> setCertificate ( $ x509Data ) ; $ x509Data = new X509Data ( ) ; $ x509Data -> addData ( $ x509Certificate ) ; $ keyInfo = new KeyInfo ( ) ; $ keyInfo -> addInfo ( $ x509Data ) ; $ keyDescriptor = new KeyDescriptor ( ) ; $ keyDescriptor -> setKeyInfo ( $ keyInfo ) ; return $ keyDescriptor ; }
Create a KeyDescriptor with the given certificate.

@param string $x509Data The certificate, as a base64-encoded DER data.
@return \SAML2\XML\md\KeyDescriptor The keydescriptor.
Create a KeyDescriptor with the given certificate .