Migrates all usage of crypto-js/sha256 to ./crypto

This commit is contained in:
Daniel Cousens 2014-04-08 22:13:03 +10:00
parent 81d9c8e759
commit c99a576fbd
11 changed files with 90 additions and 77 deletions

View file

@ -144,10 +144,10 @@ Script.prototype.toScriptHash = function() {
}
if (outType == 'P2SH') {
return crypto.sha256ripe160(this.buffer)
return crypto.hash160(this.buffer)
}
return crypto.sha256ripe160(this.buffer)
return crypto.hash160(this.buffer)
}
//TODO: support testnet
@ -257,7 +257,7 @@ Script.prototype.simpleInPubKey = function() {
* This method is useful for indexing transactions.
*/
Script.prototype.simpleInHash = function() {
return crypto.sha256ripe160(this.simpleInPubKey())
return crypto.hash160(this.simpleInPubKey())
}
/**