a super simple hashing library for node.js
Alternatives To Node_hash
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Blake33,8481456 days ago25January 25, 202299otherAssembly
the official Rust and C implementations of the BLAKE3 cryptographic hash function
Jssha2,1571,6573802 months ago20December 07, 20202bsd-3-clauseTypeScript
A JavaScript/TypeScript implementation of the complete Secure Hash Standard (SHA) family (SHA-1, SHA-224/256/384/512, SHA3-224/256/384/512, SHAKE128/256, cSHAKE128/256, and KMAC128/256) with HMAC.
Imagehash1,87830224 days ago14November 29, 202132mitPHP
🌄 Perceptual image hashing for PHP
2 months ago49gpl-3.0C++
📝 File hashing and checking shell extension
3 years ago1February 27, 20183otherC++
Advanced library for randomization, hashing and statistical analysis (devoted to chaos machines). :microscope:
Deepdiff1,61140822415 days ago63April 10, 202259otherPython
DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.
Cryptopasta1,509123684 years agoOctober 03, 202111otherGo
copy & paste-friendly golang crypto
Robin Hood Hashing1,283
2 months ago17mitC++
Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
Object Hash1,257179,5491,46822 days ago47February 18, 202235mitJavaScript
Generate hashes from javascript objects in node and the browser.
Name That Hash1,214
2 months ago6gpl-3.0Python
🔗 Don't know what type of hash it is? Name That Hash will name that hash type! 🤖 Identify MD5, SHA256 and 300+ other hashes ☄ Comes with a neat web app 🔥
Alternatives To Node_hash
Select To Compare

Alternative Project Comparisons

#node_hash - a super simple hashing library for node.js

supports md5, sha1, sha256, sha512, ripemd160

##what is a hash?

a "hash algorithm" is a one-way mathematical equation that takes in an arbitrary length input and produces a fixed length output string. the output of this algorithm is called a "hash value" and is a unique and extremely compact numerical representation of the original input.

##why bother hashing?

there are many reasons for hashing and many detailed explanations on the web. i'll illustrate one very simple example and why I am currently using this library.

imagine you had a database that stored user accounts with passwords. anyone who got access to your database, would have access to the passwords of all your users. many people utilize the same password across many services, so their entire online identity could be compromised.

even if you have your database fully protected from outside intruders, you can still be at risk. imagine you were running a development shop and required a minor schema change for your users table. this task could be delegated to a junior developer or contractor, but since your passwords are stored in plain text you've just given the passwords of your entire user base to a low-level employee.

##how would hashing help this problem?

instead of storing your user's password as plaintext, you could perform a hash on the password before being storing it in your database.

now, instead of seeing a human readable format, you will see an obfuscated string representing the hash of your password.

everytime you want to check if a value matches that hash (in this case, perhaps a login form handler), you can simply call the same hashing method on that value and compare it to the value in your database. if the hashes match, the passwords match.

you can also provide an optional "salt" that will further encrypt your password, making it even harder to reverse / crack. you should use a unique salt for every password and store that salt.


  var sys = require('sys'), 
  hash = require('./lib/hash');

  // a user's password, hash this please
  var user_password = "password";

  // don't expose your salt ( you should use a new salt for every password )
  var salt = "[email protected]";

  /****** md5 ******/
  var md5 = hash.md5(user_password);

  var salted_md5 = hash.md5(user_password, salt);

  /****** sha1 ******/
  var sha1 = hash.sha1(user_password);

  var salted_sha1 = hash.sha1(user_password, salt);

  /****** sha256 ******/
  var sha256 = hash.sha256(user_password);

  var salted_sha256 = hash.sha256(user_password, salt);

  /****** sha512 ******/
  var sha512 = hash.sha512(user_password);

  var salted_sha512 = hash.sha512(user_password, salt);

  /****** ripemd160 ******/
  var ripemd160 = hash.ripemd160(user_password);

  var salted_ripemd160 = hash.ripemd160(user_password, salt);


why not use the node.js crypto library instead?

node_hash DOES use the built in node.js crypto library, we are just wrapping it for easy use

why doesn't node_hash do X (binary, base64, streaming, etc)?

node_hash is meant as a very simple library for hashing text with optional salts in the most common encryption algorithms. if you need finer tuned control, you should be using the crypto module directly

Popular Hashing Projects
Popular Hash Projects
Popular Computer Science Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.