def encrypt(self, text, recv_key="", template="", key_type=""):
        if not key_type:
            key_type = self.encrypt_key_type
        if not template:
            template = self.template

        return self.crypto.encrypt(text, recv_key, template, key_type)
xmlsec encrypt --pubkey-pem pub-userkey.pem
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/sigver.py/SecurityContext.encrypt