'Returns the given session dictionary pickled and encoded as a string.'

def encode(self, session_dict):

    pickled = pickle.dumps(session_dict, pickle.HIGHEST_PROTOCOL)
    hash = self._hash(pickled)
    return base64.encodestring(((hash + ':') + pickled))
