On Friday, April 12, 2002, at 07:55 PM, Gabriel Duchateau wrote:
> I am trying to setup a small application with a passwd controlled access.
> I
> need just a little bit of security so I decided to use the crypt function
> on
> perl to encrypt the user passwd. The problem I have is when writing the
> encrypted passwd to a file using the pack function. The pack function
> returns NULL when packing the encrypted passwd, so I am unable to save it
> to a file. I hope somebody can help me. Here is a sample code I have:
>
> $passwd = <STDIN>;
> chomp($passwd);
>
> $epasswd = crypt($passwd,$salt);
>
> open(FILE, '>>$file_name');
>
> print FILE pack ('A10','epasswd');
>
> close (FILE);
>
>
> Thanks for any help
why do you need to pack it?
that line says it is ten characters?
crypt can return any length string i think. well, it may go up in
increments of some amount like 8 or 10 bytes at a time, but i don't think
there's a limit.
and the encrypted character set can include '.' and '/' which aren't alpha
characters.
i would just right it out as is.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]