Skip to content

SHA-1 implementation in JavaScript (1480 bytes; intended for bookmarklets, etc.)

Notifications You must be signed in to change notification settings

kazuho/sha1.min.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SHA1.MIN.JS

A very short implementation of SHA-1 in JavaScript. As of commit b4fbff4, it is 1,480 bytes long.

USAGE

Sha1.min.js exports a function called hex_sha1.

console.log(hex_sha1('abc')); // prints a9993e364706816aba3e25717850c26c9cd0d89d

LICENSE

BSDL. Original code (http://pajhome.org.uk/crypt/md5/sha1.html) is provided under the following license.

/*
 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
 * in FIPS 180-1
 * Version 2.2 Copyright Paul Johnston 2000 - 2009.
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for details.
 */

About

SHA-1 implementation in JavaScript (1480 bytes; intended for bookmarklets, etc.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published