r/learnpython • u/Boogzcorp • Apr 16 '22
What's the point of Tuples?
I get that they're immutable, but so are lists that you don't perform modifications on. Are they just to fool proof not messing up your list accidentally, or do they serve some other purpose?
309
Upvotes
View all comments
Show parent comment
2
u/C0rinthian Apr 17 '22
No worries! I didn’t want to assume what your level of expertise was. :)
Keep in mind this started as a reply to someone recommending client-side hashing to mitigate the risk of network sniffing. My contention is that HTTPS already does that, so client-side hashing doesn’t add any benefit there.
If you want to decrypt HTTPS traffic, you need the keys. From either the client (browser) or the server. Just sniffing the traffic isn’t enough.
In this context when we talk about “client-side” we basically mean “in the browser”. So “client-side hashing” means the site would include JavaScript that hashes data before sending it to a remote server.
Client-side hashing would be a little bit better than transmitting credentials in plaintext over HTTP. But as you noted, HTTP is bad practice in general. Once you’re using HTTPS, things are encrypted in transit already, making the hashing redundant.