Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async.until(
- function() {return found},
- function(callback) {
- var hash_array = []
- var possible = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
- for (var i = 0; i <= hash_length - 1; i++) {
- var n = (Math.floor(Math.random() * possible.length))
- hash_array.push(possible.charAt(n))
- }
- hash = hash_array.join('')
- cache.get(hash, function(err, res) {
- if (res == false) {
- found = true
- }
- callback()
- })
- },
- function() {
- cb(hash)
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement