Closed mathbruyen closed 10 years ago
Hi there! Thanks for contributing! :) And yay for the Mocha tests ;)
Two issues:
rusha.pp.js
, for this is the original source file.Int32Array
with the proper endianess?I'll update the proper file. What are the commands to generate the other ones?
I will go back to the Int32Array too.
Just a simple make rusha.min.js
will do.
Source file updated and it returns again an Int32Array.
My bad about the build script, I did not spot the Makefile
. To remove any doubt, I added commands in README.md
Wow, man, you're awesome! :+1: And thanks for contributing!
Hey, I just moved the endianness fix out of RushaCore
, into the rawDigest
function, to restore asm.js
functionality. The tests run fine for me. Could you check this is also the case for you?
It is fine to me (I'm not that fluent in ams.js
), thanks for merging!
Rusha#rawDigest
used to return anInt32Array
with the byte order of the underlying platform and not sliced, which made the usage of the underlyingArrayBuffer
obtained byInt32Array#buffer
hard (one had to copy in another array using the proper endianness).Changes a bit the API as
rawDigest
now reportedly returns anArrayBuffer
instead of anInt32Array
. ThisArrayBuffer
is sliced at 20 bytes.Added tests using the string
abc
as an example (as for the spec).If you are not happy with changing the API to returning
ArrayBuffer
, I can get back to returning anInt32Array
but this time with an underlying buffer sliced and proper endianness. Same thing if you are not happy with Mocha tests, I can change that to whatever you prefer.