jsSHA

Software Screenshot:
jsSHA
Software Details:
Version: 2.0.1 updated
Upload Date: 28 Sep 15
Developer: Brian Turek
Distribution Type: Freeware
Downloads: 2

Rating: nan/5 (Total Votes: 0)

jsSHA is a complelely free, open source, cross-browser and web-based software written in JavaScript and designed to implement the entire family of SHA hashes, including SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.

When using the jsSHA script, you should be aware of the fact that it is also capable of implementing the SHA-512 and SHA-384 hashes, even if JavaScript doesn’t support 64-bit operations natively.

Also implements HMAC

It also implements HMAC (keyed-Hash Message Authentication Code). Secure Hash Algorithm is defined by FIPS PUB 180-2 and FIPS PUB 198-1 in the following documents http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf / http://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf.

Getting started with jsSHA

In order to use jsSHA, you will need to include the desired JavaScript file (sha.js, sha1.js, sha256.js or sha512.js) in your header, e.g., < script type="text/javascript" src="/path/to/sha.js" >. Add a new jsSHA object with your string to be hashed and its format (HEX or TEXT) as the parameters.

Then, you will have to call the function using the hashed string and the algorithm. For example, you should use the var hash = hex_sha("This is a Test", "SHA-512"); code to achieve that. More details and examples are found on the project’s website.

Compiling jsSHA

The jsSHA software makes use of the Google Closure Compiler to reduce filesizes, as well as to boost performance. If you want to compile the sha_dev.js script into a customized output file, you must use the ‘java -jar compiler.jar --define="SUPPORTED_ALGS=" --externs /path/to/build/externs.js --warning_level VERBOSE --compilation_level ADVANCED_OPTIMIZATIONS --js /path/to/sha_dev.js --js_output_file /path/to/sha.js’ command, where FLAG can be one of the following values (1 for SHA-1, 4 for SHA-384/SHA-512, 2 for SHA-224/256) or bitwise.

What is new in this release:

  • Fixed major issue with all hashes failing if raw input was a particular size (thanks treus!)

What is new in version 1.5.0:

  • Added optional numRounds argument to getHash. Note: this necessitated removing the hash result caching functionality
  • Reduced file size by optimizing internal constants
  • Removed charSize input and replaced with encoding to handle Unicode. NOTE: Only Code points up to 0xFFFF are supported.
  • charSize = 16 is effectively replaced by encoding = "UTF16"
  • charSize = 8 was wrong in terms of handling UTF-8 and has been replaced by encoding = "UTF8"
  • Changed method of referencing "window" to be compatible with WebWorkers, Node.js, and AMD (thanks piranna!)

What is new in version 1.3:

  • The way that classes are declared was changed.
  • Several methods and properties were moved to class scope, reducing overall memory usage of the library.
  • Several small optimizations that speed up the hash generation were also made.

What is new in version 1.11:

  • This release fixes a base-64 encoding issue resulting from a missing capital 'X'.

What is new in version 1.1:

  • In order to prevent global variable pollution, all functionality has been moved to a jsSHA object.
  • With this change, the interface used to calculate hashes has changed significantly.
  • The object-orientated architecture also allowed for hash results to be cached internally, which can lead to performance gains.
  • jsSHA (specifically sha.js) now validates against JSLint using "Recommended" settings.
  • Also, the size of the files meant for production use was shrunk drastically.

Requirements:

  • Java 2 Standard Edition Runtime Environment

Other Software of Developer Brian Turek

jsSHA
jsSHA

10 Dec 15

Comments to jsSHA

Comments not found
Add Comment
Turn on images!