Modified double SHA256 to fit BIP143

This commit is contained in:
tripathyr 2022-09-21 16:02:08 +05:30 committed by GitHub
parent 4579562765
commit b9ac6d73f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2653,7 +2653,11 @@
}
coinjs.dSHA256 = function(data){
return Crypto.SHA256(Crypto.util.hexToBytes(Crypto.SHA256(data)));
var t1,t2,t3 ;
t1= Crypto.SHA256(Crypto.util.hexToBytes(data));
t2= Crypto.util.hexToBytes(t1);
t3= Crypto.SHA256(t2);
return t3;
}
coinjs.random = function (length) {