Migrates all usage of crypto-js/sha256 to ./crypto
This commit is contained in:
parent
81d9c8e759
commit
c99a576fbd
11 changed files with 90 additions and 77 deletions
src
|
@ -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())
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue