Table of Contents

About

MD5 (Message Digest 5) is a hash function

The primary function of an MD5 algorithm is to generate a message digest value (128-bit cryptographic), hence the name.

Security

md5 is not a secure hash algorithm. 1)

md5 is only safe for non security purposes because it's not difficult enough to create a hash collision (ie to create two different input texts that hash to the same value)

Properties

Length

The length is a fixed value of 128 bits

  • ie 32 hexadecimal (1 hexa = 4 bit)
  • ie 32 hexadecimal characters.

Tool

Tool

md5sum file

Library

var crypto = require('crypto');
var name = 'secret';
var hash = crypto.createHash('md5').update(name).digest('hex');
console.log(hash);