I'm putting this on CompuServe since someone was asking about encryption
programs.
 
Distribution is UNLIMITED - the main reason I put this together was to
try the idea out for something else I am working on.


Purpose: A simple encryption/decryption program. It is VERY
unsophisticated (simply using exclusive-or together with one of C's
random-number generators), but has two features: a) the same character
occuring two different places in the file (even right after each other) will
end up being encrypted into two different characters, and b) because of the
use of exclusive-or there is no need for a separate decryption program; 
if you run crypt twice with the same cryption key, you will get back what
you started with. For instance:

crypt file1 file2
Enter encryption/decryption key
wazoo

crypt file2 file3
Enter encryption/decryption key 
wazoo

After the above two commands, file3 will be the same as file1.




Use:
	crypt infile outfile

	Where infile is the file to be encrypted or decrypted. You will be 
prompted for a cryption key. It can be up to 20 characters of anything
you want, but GET IT RIGHT. Case matters - Tweedle Dum is different 
from TWEEDLE DUM or tweedle dum. If you give more than 20 characters, they
will be truncated at 20 characters.




Source:
	The Lattice 4.0 source is provided in crypt.c. Due the use of mrand and
srand, the math library must be provided during linking. The following
command works to compile and link:
lc -Lm crypt.c