Expand description
ยงOne-Time Pad
Brute force slog through all possible keys, parallelized as much as possible. An optimization
for part two is a quick method to convert u32
to 8 ASCII digits.
Structsยง
- Exclusive ๐
- Regular data structures need to be protected by a mutex.
- Shared ๐
- Atomics can be safely shared between threads.
Functionsยง
- check ๐
- Check for sequences of 3 or 5 consecutive matching digits.
- format_
string ๐ - Write the salt and integer index as ASCII characters.
- generate_
pad ๐ - Find the first 64 keys that sastify the rules.
- parse
- part1
- Hash each key once.
- part2
- Hash each key an additional 2016 times.
- to_
ascii ๐ - Quickly convert a
u32
to an array of 8 ASCII values. - worker ๐