def sign_statement(self, statement, node_name, key_file, node_id,
                       _id_attr, passphrase=None):
        import xmlsec
        import lxml.etree

        assert passphrase is None, "Encrypted key files is not supported"

        xml = xmlsec.parse_xml(statement)
        signed = xmlsec.sign(xml, key_file)
        return lxml.etree.tostring(signed, xml_declaration=True)
Sign an XML statement.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/sigver.py/CryptoBackendXMLSecurity.sign_statement