Created
January 20, 2018 01:21
-
-
Save NaokiStark/c4bc89c7f231201d232332be51752242 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//(sha256) | |
function MineHash(startHash, diff){ | |
hashCalc = ""; | |
startsWith = diff; | |
number = 0; | |
while(hashCalc.substring(0, startsWith) != "0".repeat(startsWith)){ | |
number++; | |
hashCalc = sha256(startHash+number); | |
} | |
return {hash:hashCalc, n:number}; | |
} | |
var hash = MineHash("xd", 2); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment