Re:The SHA256 for this sentence begins with: one, eight, two...
by Twirrim on Tuesday September 12, 2023 @06:11PM
(#37489275)
> 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)`
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.