Parallel Brute-Force Algorithm

限于喜欢 提交于 2019-12-04 17:03:38

Why the NrCombinations method and not just

long combinations = (long)Math.Pow(base, stringLength);

I would also recommend against int for nrCombinations because with only six characters with your base 36 alphabet you will get in trouble (36^6 > 2^31). Use long. I don't think BigInteger is needed because if you need that big numbers brute force will not be an option anyway.

I have this idea that it might be possible to speed up brute force by using a kind of De Bruijn sequence stream. Seems reasonable but I have to get back on that because I have no code to show right now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!