modernpython
modernpython copied to clipboard
random.expovariate() usage inside the check_user function
Raymond thanks for the amazing course!
i have a question regarding this snippet of code: https://github.com/rhettinger/modernpython/blob/d305a097607acce12fb687a3a24da993fdfb6353/pubsub/pubsub.py#L85-L89
whats the point of a random sleep with exponential distribution ? to my knowledge it wont prevent timing attacks. according to the documentation compare_digest is designed to prevent timing analysis so it already takes care of that for us.
thank you.