Skip to content
Permalink
Browse files

Added hash-finding, just to get started

  • Loading branch information...
ihatecsv committed May 25, 2017
1 parent 70873d1 commit 93ba4b765c6ff9296d473cc0345d99a538e1f761
Showing with 17 additions and 0 deletions.
  1. +17 −0 index.js
@@ -0,0 +1,17 @@
var crypto = require('crypto');

var base = "Drake";
var nonce = 0;
var found = false;

while(!found){
var hash = crypto.createHash('sha256').update(base + nonce).digest('base16').toString('hex');
console.log(nonce + ": " + hash);
if(hash.substring(0,4) == "0000"){
console.log("--------FOUND!--------");
console.log(base + nonce);
console.log(hash);
found = true;
}
nonce++;
}

0 comments on commit 93ba4b7

Please sign in to comment.
You can’t perform that action at this time.