'Returns hash(version | session_id | user_id |)'

def _compute_digest(self, user_id):

    hash_func = sha256()
    for data_item in [self.version, self.session_id, user_id]:
        hash_func.update(unicode(data_item))
        hash_func.update('|')
    return hash_func.hexdigest()
