| Start |
|---|
| MD5 Hash functions map binary strings of an arbitrary length to small binary strings of a fixed length. The The Example: Output: The MD5 hash of Hello World! is: ED076287532E86365E841E92BFC50D8C Security Issues: (opens new window) Like most hash functions, MD5 is neither encryption nor encoding. It can be reversed by brute-force attack and suffers from extensive vulnerabilities against collision and preimage attacks. |
SHA1 Output: The SHA1 hash of Hello Word! is: 2EF7BDE608CE5404E97D5F042F95F89F1C232871 |
SHA256 Output: The SHA256 hash of Hello World! is: 7F83B1657FF1FC53B92DC18148A1D65DFC2D4B1FA3D677284ADDD200126D9069 |
SHA384 Output: The SHA384 hash of Hello World! is: BFD76C0EBBD006FEE583410547C1887B0292BE76D582D96C242D2A792723E3FD6FD061F9D5CFD13B8F961358E6ADBA4A |
SHA512 Output: The SHA512 hash of Hello World! is: 861844D6704E8573FEC34D967E20BCFEF3D424CF48BE04E6DC08F2BD58C729743371015EAD891CC3CF1C9D34B49264B510751B1FF9E537937BC46B5D6FF4ECC8 |
| PBKDF2 for Password Hashing PBKDF2 ("Password-Based Key Derivation Function 2") is one of the recommended hash-functions for password-hashing. It is part of rfc-2898 (opens new window). .NET's PBKDF2 requires a salt (opens new window) and the number of iterations. Iterations: A high number of iterations will slow the algorithm down, which makes password cracking a lot harder. A high number of iterations is therefor recommended. PBKDF2 is order of magnitudes slower than MD5 for example. Salt: A salt will prevent the lookup of hash values in rainbow tables. (opens new window) It has to be stored alongside the password hash. One salt per password (not one global salt) is recommended. |
Complete Password Hashing Solution using Pbkdf2 Please see this excellent resource Crackstation - Salted Password Hashing - Doing it Right (opens new window) for more information. Part of this solution (the hashing function) was based on the code from that site. RemarksMD5 and SHA1 are insecure and should be avoided. The examples exist for educational purposes and due to the fact that legacy software may still use these algorithms. |
Read Article
https://develop.horje.com/learn/1434/reference