Tag Info

New answers tagged

2

When in doubt, use SHA-256. This is the default answer for situations where you need a generic hash function; for specialized cases such that hashing passwords, the situation is different: you don't want to use MD5 or SHA-1 or SHA-2 or SHA-3 for passwords, but something like bcrypt. SSL is a deployed standard with a long history, and typically uses SHA-1. ...


2

Which algorithm is best depends on what you're using it for. If you're trying to spot random data corruption, for example, a blindingly-fast algorithm like CRC-32 is ideal. On the other hand, if you're trying to secure password hashes, you want an inherently slow algorithm like bcrypt. For protecting data transfers against malicious tampering, you want a ...


0

Of course I cringe at the idea of a simple hashing over a passphrase, but let's assume that it is actually OK in your setup. The direct answer to your question is simple: practically, there are no collisions in SHA-256, regardless of input length. If you input two distinct sequences of bytes (e.g. two passphrases), you will get two distinct output. ...



Top 50 recent answers are included