Subject: Re: Help me understand why there is no UNIX utility to encrypt a
To: John Maier <jmaier@midamerica.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 12/07/2000 13:11:45
On Thu, 7 Dec 2000, John Maier wrote:

> Well looking at this raises a question...
> 
> What if your key (password) needs to be longer that 8 characters?

The crypt function only uses the first eight characters, so makekey only
needs eight (anything after would be the salt). I think this has something
to do with DES using 64 bits.

> Also is the input format?  It isn't specified in the man page.

Just enter the eight characters, followed by the two character salt.

Here are some examples which include also using perl and crypt with a ten
character password (both create the same result).

rainier:~$ /usr/libexec/makekey 
12345678AB
AB1Gdy0FbsN2grainier:~$ perl -e 'print crypt("1234567890","AB");'
AB1Gdy0FbsN2grainier:~$ 

   Jeremy C. Reed
   http://www.reedmedia.net/