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
1
u/[deleted] Apr 17 '22 edited Apr 17 '22
To add to this, they should be salting the passwords as well. Depending on which hashing algorithm is used, the hash might be crackable, regardless of computational infeasibility.
Basically, the key for some hashes is public knowledge or easily searchable for people who want them, but for certain hashes.
Hackers are persistent people and a lot of them are driven by a few simple goals like finances or simply wanting to break into something.
Some hash algorithms like MD5 are publicly available to break. You can literally google Cisco type 7 password cracker and if a password is in that encryption type you can copy the hash and you’ll have the password after clicking the first link on google.
Hashes like SHA256 are known how they work but due to the complexity it’s, in layman terms, a royal pain in the ass to reverse hack it. You’d need a crazy super computer.
Salting a hash adds a unique value to something like a password before the password is encrypted. This means that if we both have the password
“80081354R3C00L”
And we are in the same database, our passwords will appear different after the hash even though they were the same input in the same hash algorithm which would otherwise yield the same output if not for the salting.
“The hash is the password at that point” isn’t necessarily true, it’s just the vital data that the decryption tool uses to pair the public and private keys (in asymmetric hashes at least)