src/Saml.php
public function signMessage(SamlMessage $message)
    {
        return $message->setSignature(
            new SignatureWriter(
                $this->getMetadata()
                    ->getFirstSpSsoDescriptor()
                    ->getFirstKeyDescriptor(KeyDescriptor::USE_SIGNING)
                    ->getCertificate(),
                KeyHelper::createPrivateKey($this->getPrivateKey(), '')
            )
        );
    }
public function signMessage(SamlMessage $message)
    {
        return $message->setSignature(
            new SignatureWriter(
                $this->getMetadata()
                    ->getFirstSpSsoDescriptor()
                    ->getFirstKeyDescriptor(KeyDescriptor::USE_SIGNING)
                    ->getCertificate(),
                KeyHelper::createPrivateKey($this->getPrivateKey(), '')
            )
        );
    }
public function signMessage ( SamlMessage $ message ) { return $ message -> setSignature ( new SignatureWriter ( $ this -> getMetadata ( ) -> getFirstSpSsoDescriptor ( ) -> getFirstKeyDescriptor ( KeyDescriptor :: USE_SIGNING ) -> getCertificate ( ) , KeyHelper :: createPrivateKey ( $ this -> getPrivateKey ( ) , '' ) ) ) ; }
Sign a Saml Message

@param SamlMessage $message

@return SamlMessage
Sign a Saml Message