"May I ask what Bin.js, browserify.js were for? They seem like relics from days past?
Also, why have you not used Buffer consistently throughout? Browserify buffer should have alleviated any reason to add fallbacks for encoding etc."
bin.js allows you to install sha.js globally, this is mainly useful for testing.
also, browserify forces sha.js to use the js crypto and buffer polyfil when running in node.js
again, this is to make testing easier (because you can test in node.js instead of a browser)
I used typed arrays in a few places because it was faster. This may have changed since then because the browserify buffer is much more developed than at the time I wrote this.
Daniel asked me this by email:
"May I ask what Bin.js, browserify.js were for? They seem like relics from days past? Also, why have you not used Buffer consistently throughout? Browserify buffer should have alleviated any reason to add fallbacks for encoding etc."
bin.js allows you to install sha.js globally, this is mainly useful for testing. also, browserify forces sha.js to use the js crypto and buffer polyfil when running in node.js again, this is to make testing easier (because you can test in node.js instead of a browser)
I used typed arrays in a few places because it was faster. This may have changed since then because the browserify buffer is much more developed than at the time I wrote this.