'xmlsec encrypt --pubkey-pem pub-userkey.pem
--session-key aes128-cbc --xml-data doc-plain.xml
--output doc-encrypted.xml session-key-template.xml
:param text: Text to encrypt
:param recv_key: A file containing the receivers public key
:param template: A file containing the XMLSEC template
:param key_type: The type of session key to use
:result: An encrypted XML text'

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)
