@staticmethod<EOL><INDENT>def prepare(session_data={}, <EOL>passphrase=None):<DEDENT>
if passphrase is None:<EOL><INDENT>passphrase = settings.DJAODJIN_SECRET_KEY<EOL><DEDENT>encrypted = crypt.encrypt(<EOL>json.dumps(session_data, cls=crypt.JSONEncoder),<EOL>passphrase=passphrase,<EOL>debug_stmt="<STR_LIT>")<EOL>if not isinstance(encrypted, six.string_types):<EOL><INDENT>as_text = encrypted.decode('<STR_LIT:ascii>')<EOL><DEDENT>else:<EOL><INDENT>as_text = encrypted<EOL><DEDENT>return as_text<EOL>
Returns *session_dict* as a base64 encrypted json string.

The full encrypted text is special crafted to be compatible
with openssl. It can be decrypted with:

  $ echo _full_encypted_ | openssl aes-256-cbc -d -a -k _passphrase_ -p
  salt=...
  key=...
  iv=...
  _json_formatted_