ok, let me fix that.

I think we can export all cryptojs.


On Wed, Mar 12, 2014 at 3:02 PM, Ryan X. Charles
<notifications@github.com>wrote:

> In browser/vendor/ripemd160.js:
>
> > -module.exports.RIPEMD160 = CryptoJS.RIPEMD160;
> > -module.exports.WordArray = CryptoJS.lib.WordArray;
> > +module.exports.ripemd160 = function(bytes) {
> > +  if (!Buffer.isBuffer(bytes)) {
> > +    throw new Error('arg should be a buffer');
> > +  }
> > +  var w = new CryptoJS.lib.WordArray.init(Crypto.util.bytesToWords(bytes), bytes.length);
> > +  var wordArray = CryptoJS.RIPEMD160(w);
> > +  var words = wordArray.words;
> > +  var answer = [];
> > +  for (var b = 0; b < words.length * 32; b += 8) {
> > +      answer.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
> > +  }
> > +  return answer;
> > +};
> > +
>
> Maybe we can import the unminified code for ripemd160.js and put it there?
> That would be better than putting an unminified function in an otherwise
> minified file.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bitpay/bitcore/pull/140/files#r10531358>
> .
>



-- 
Matías Alejo Garcia
Skype/Twitter: @ematiu
Roads? Where we're going, we don't need roads!