"Numerical Recipes in C"..Fortran..Pascal  has a nice section on
encryption and decryption based on the DES algorithm.  There is
also source code provided (I think some versions of this book are 
distributed with the source code on disk; the source code can
also be ordered from the publisher).