FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Hash Functions Explained: MD5, SHA-1, SHA-256, and When to Use Each
How-ToWeb Development

Hash Functions Explained: MD5, SHA-1, SHA-256, and When to Use Each

via Dev.to Webdev楊東霖2h ago

Hash Functions Explained: MD5, SHA-1, SHA-256, and When to Use Each What is a Hash Function? A hash function converts input of any size into a fixed-length "fingerprint." The same input always produces the same output. You cannot reverse a hash. // Node.js const crypto = require ( ' crypto ' ); console . log ( crypto . createHash ( ' sha256 ' ). update ( ' hello ' ). digest ( ' hex ' )); // Output: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 console . log ( crypto . createHash ( ' md5 ' ). update ( ' hello ' ). digest ( ' hex ' )); // Output: 5d41402abc4b2a76b9719d911017c592 Comparison Table Algorithm Output Length Speed Security Use Case MD5 128-bit Fast ❌ Broken File checksums (non-security) SHA-1 160-bit Fast ❌ Deprecated Git commits (historical) SHA-256 256-bit Medium ✅ Secure General-purpose hashing bcrypt Variable Slow ✅ Secure Password storage Argon2 Variable Slow ✅ Best Password storage (recommended) Why MD5 and SHA-1 Are Broken // MD5 collision example (si

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
0 views

Related Articles

IntentCAD v0.8.0 — Thirteen EPICs, One Day
How-To

IntentCAD v0.8.0 — Thirteen EPICs, One Day

Dev.to • 1h ago

A Growing Position Doesn't Always Mean Fresh Buying — Here's How to Tell
How-To

A Growing Position Doesn't Always Mean Fresh Buying — Here's How to Tell

Dev.to Beginners • 2h ago

Tutorials Are Lying to You Here’s What Actually Works ?
How-To

Tutorials Are Lying to You Here’s What Actually Works ?

Medium Programming • 5h ago

Flutter Mistakes That Make Apps Slow ⚡
How-To

Flutter Mistakes That Make Apps Slow ⚡

Medium Programming • 5h ago

Welcome Thread - v370
How-To

Welcome Thread - v370

Dev.to • 5h ago

Discover More Articles