3 ms·
This is an interesting starting point for a python implementation, but it doesn't work correctly as far as I can tell. The list of tokens leaves out zero and i
by rainsford 3y ago
This is an interesting starting point for a python implementation, but it doesn't work correctly as far as I can tell. The list of tokens leaves out zero and includes a bunch of ascii characters that aren't valid hex. That second problem won't produce wrong results, but it'll spend a lot of time testing combinations that can't possibly appear in a SHA256 hex output. I also think the original tweet calculated without a newline.
More significantly, permutation in python is probably not the right tool for this. I believe it will not repeat token values at different positions, so for example you'll never end up testing "The SHA256 for this sentence begins with: f, f, and f", which is certainly a potentially valid result.
- Twirrim 3y ago> The list of tokens leaves out zero and includes a bunch of ascii characters that aren't valid hex I rewrote it in rust last night and realised that, yeah. Lots of wasted time on irrelevant characters. >permutation in python is probably not the right tool for this. Correct, missed that. I need `itertools.product(<iterable>, repeat=2)`