Implementation of the SHA-1 hashing function in Javascript with a command line interface for hashing inputs.
- run
npm install
- run
node main.js
- input any text to see its SHA-1 hash value output
A concise and thoroughly commented implementation of the SHA-1 hashing function in Javascript that should be relatively easy to follow along with. There are associated test specs that were used primarily in developing the utils module, as well as several test specs to check the final implementation of the SHA-1 function. These specs as well as the comments could be used as a rough guide to create one's own implementation of SHA-1. This implementation was not coded with efficiency in mind and is not the most effective implementation of SHA-1, nor should it be used for any security purposes.
- http://www.movable-type.co.uk/scripts/sha1.html
- http://www.metamorphosite.com/one-way-hash-encryption-sha1-data-software
- https://tools.ietf.org/html/rfc3174
- https://en.wikipedia.org/wiki/SHA-1
- https://en.wikipedia.org/wiki/Cryptographic_hash_function
- https://www.sans.org/reading-room/whitepapers/vpns/overview-cryptographic-hash-functions-879
- https://www.tutorialspoint.com/cryptography/cryptography_hash_functions.htm
- http://www.unixwiz.net/techtips/iguide-crypto-hashes.html