Extract crypt.c from misc2.c

see issue #209