':param text: The text to be compiled
:param recv_key: Filename of a file where the key resides
:param template: Filename of a file with the pre-encryption part
:param session_key_type: Type and size of a new session key
"des-192" generates a new 192 bits DES key for DES3 encryption
:param xpath: What should be encrypted
:return:'

def encrypt(self, text, recv_key, template, session_key_type, xpath=''):

    logger.debug(('Encryption    input    len:    %d' % len(text)))
    (_, fil) = make_temp(('%s' % text), decode=False)
    com_list = [self.xmlsec, '--encrypt', '--pubkey-cert-pem', recv_key, '--session-key', session_key_type, '--xml-data', fil]
    if xpath:
        com_list.extend(['--node-xpath', xpath])
    (_stdout, _stderr, output) = self._run_xmlsec(com_list, [template], exception=DecryptError, validate_output=False)
    return output
