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

@ -2686,6 +2686,14 @@
return t2; 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) { coinjs.random = function (length) {
var r = ""; var r = "";
var l = length || 25; var l = length || 25;