def make_csrf_token(req, session_id, ts=None):
 ts = ('%x' % (ts if (ts is not None) else time.time()))
 payload = [req.server.secret, session_id, ts]
 return ('%s-%s' % (ts, b64w(sha512b64('-'.join(payload)))))

def make_csrf_token ( req , session_id , ts = None ) : ts = ( '%x' % ( ts if ( ts is not None ) else time . time ( ) ) ) payload = [ req . server . secret , session_id , ts ] return ( '%s-%s' % ( ts , b64w ( sha512b64 ( '-' . join ( payload ) ) ) ) )
generate a hashed token from the current timestamp .