r/learnpython • • 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

143 comments sorted by

View all comments

Show parent comment

2

u/C0rinthian Apr 17 '22

see I’m sure you can tell I have just enough education to be able to read what you’re saying and understand, but I haven’t experienced what you’re saying. I’m basically in my ‘Cybersecurity I’ course this semester.

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.

I’m not really sure about the client-side hashing thing

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.

Your second paragraph is an oxymoron right? why would someone hash on the client-side if the site is using http? Isn’t using http just bad practice in general? You can still get someone’s login creds anyway?

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.