def get_flask_sig(): sig_str = '&'.join(( session_str('session_id'), session_str('admin_id'), session_str('timestamp'), )) return get_sig( settings.app.cookie_secret2, sig_str, )
def check_flask_sig(): return const_compare(session_str('signature'), get_flask_sig())
def check_flask_sig(): return session_str('signature') == get_flask_sig()