I was working on making a portable version of crypt and decided to use
the FreeBSD version. I cleaned up the source and fixed a small bug in
the process, which I've merged back here:
- Reformat code to conform to style(9) guide.
- Use getopt for option handling.
- Replaced getpass(3) with the better readpassphrase(3).
- Since we use the first two bits of the key as the salt, check if the key contains valid DES contains valid characters.
- Replace error message code with err/x.
- Change variable types to be more consistient.
Also, this is my first time using Phab. I may not get everything right.