srijs/rusha — pull request #11 by mathbruyen (2014-02-09 09:48:28+00:00)
Title: Ordered bytes in rawDigest output

`Rusha#rawDigest` used to return an `Int32Array` with the byte order
of the underlying platform and not sliced, which made the usage of the
underlying `ArrayBuffer` obtained by `Int32Array#buffer` hard (one had to
copy in another array using the proper endianness).

Changes a bit the API as `rawDigest` now reportedly returns an
`ArrayBuffer` instead of an `Int32Array`. This `ArrayBuffer` is sliced
at 20 bytes.

Added tests using the string `abc` as an example (as for the [spec](http://tools.ietf.org/html/rfc3174#section-7.3)).

If you are not happy with changing the API to returning `ArrayBuffer`, I can get back to returning an `Int32Array` but this time with an underlying buffer sliced and proper endianness. Same thing if you are not happy with [Mocha](http://visionmedia.github.io/mocha/) tests, I can change that to whatever you prefer.