Browse Source

added lbc algo

master
kattemjau 5 years ago
parent
commit
5d8d77cf8f
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      js/cryptutil.js

+ 5
- 1
js/cryptutil.js View File

@@ -55,11 +55,15 @@ function hashLbry(blockHeader){
var hash = doublesha(blockHeader)

// sha 512
var tmp = crypto.createHash("sha512").update(hash).digest();

//ripemd160 MARTIN FIX DETTE

//ripemd160
var rm1 = crypto.createHash("rmd160").update(tmp[0]).digest();
var rm2 = crypto.createHash("rmd160").update(tmp[tmp.length/2]).digest();

// double sha256
var hash = doublesha(rm1+rm2)

return hash;
}

Loading…
Cancel
Save