Created
January 14, 2015 16:29
-
-
Save kai5263499/5ad9524232eab627f234 to your computer and use it in GitHub Desktop.
This class generates an upper and lower bound of a hex string (ie md5 or sha1 hash)
This file contains 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
var SelectNextLimit = function(upper,res) { | |
var base = parseInt(upper,16); | |
var resolution = parseInt(res, 16); | |
var upper,lower; | |
this.next = function() { | |
upper = (base).toString(16); | |
base = base - resolution; | |
lower = (base).toString(16); | |
return {upper:upper,lower:lower}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment