Added ripmd160-sha256 double hash

This commit is contained in:
tripathyr 2022-09-25 12:13:04 +05:30 committed by GitHub
parent 8d07e1201c
commit cb56d36a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2678,7 +2678,7 @@
return t5;
}
coinjs.scriptcodeCreatorBasic = function (redeemscript){
coinjs.scriptcodeCreatorBasic = function (redeemscript){
var t1,t2;
if (redeemscript.substr(0,4) == "0014"){
t1 = redeemscript.slice(2);
@ -2686,6 +2686,14 @@
return t2;
}
coinjs.ripemd160sha256 = function (data) {
var t1,t2;
t1 = ripemd160(Crypto.SHA256(Crypto.util.hexToBytes(data), {asBytes: true}), {asBytes: true});
t2 = Crypto.util.bytesToHex(t1)
return t2;
}
coinjs.random = function (length) {
var r = "";
var l = length || 25;