diff options
Diffstat (limited to 'the-ideal-stocking-stuffer/README.org')
-rw-r--r-- | the-ideal-stocking-stuffer/README.org | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/the-ideal-stocking-stuffer/README.org b/the-ideal-stocking-stuffer/README.org new file mode 100644 index 0000000..8e1edb8 --- /dev/null +++ b/the-ideal-stocking-stuffer/README.org @@ -0,0 +1,26 @@ +See: https://adventofcode.com/2015/day/4 +** Part 1 +*** Purpose +The idea is simple. Given a key: + +#+begin_example +iwrupvqb +#+end_example + +Append an integer to it, starting from 0: + +#+begin_example +iwrupvqb0 +#+end_example + +And run it through the [[https://en.wikipedia.org/wiki/MD5][MD5 hash function]]. When the result starts with "00000", return that number! + +*** Method + +The algorithm is given to us. Simply implement MD5, and an environment that will allow us to brute-force test various keys. + +** Part 2 +*** Purpose +Part two asks us to do the same thing---but look for a different output. Instead of five zeros in the resultant hash, we want six! By making this a variable, we can now look for any output! + +Beware, the more specific the desired output, the longer it takes to find! |