This is a possible solution to the CS50x (2018) problem Crack.
This solution has two features:
- It has only one layer of nested loop
- It utilizes the pointer feature of
C
- The key's
MAX_LENGTH
could be changed at compile time
make
If the build fails and you have crypt
installed on your Linux, try adding -lcrypt
to the LDLIBS
in the Makefile
to link to the library.