dominictarr/crypto-browserify — pull request #30 by jduncanator (2013-12-22 08:27:26+00:00)
Title: Add MD4, SHA224, a decent test framework and some node compliance patches

This pull request is big I have to admit but really its just a general tidy up

I started by tidying things up a little by moving all the files 'require'd by the library into a *lib* folder that is sorted by type (eg. hash, prng, symmetric (when we get there), agreement, signing).

Then I decided I hated the unit tests (sorry :cry:) so I ported all the unit tests over to Mocha/Expect.js. I also removed a bunch of the "vectors" as they were all pointless and just made the test phase bloated with unnecessary tests. If the algorithm isn't going to fail with a file full of "FF00FF00" then its not going to fail with a file full of "00FF00FF". I kept an empty file, a single byte file, a slightly bigger file and a 9kb file. I also generated some vectors for in-browser testing which can be generated with [this gist](https://gist.github.com/jduncanator/8079713). The testling configuration has been updated to work with Mocha (see https://github.com/jduncanator/crypto-browserify/commit/e0257a65933a835347dded51b6d60fbda93050e8#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R25)

I also added support for IE11's CryptoAPI as for some really odd reason it goes by the name `Crypto` instead of `crypto`.

Then, I added SHA-224 and MD4 :smile:

Feel free to critique. I'd like to rewrite it all to be more 'interface' like so each new algorithm is easier to add (and so each algorithm follows the same structure). :sleeping:

PS. Watch the changes to README :wink: