Your question is very unclear, so I really don't
know what it is, you want to do.
If you want to verify passwords, take a look here:
http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#crypt
If you want to encrypt/decrypt files, then take a
look on gpg.
--
Kasper Dupont -- der bruger for meget tid på usenet.
Note to self: Don't try to allocate 256000 pages
with GFP_KERNEL on x86.
Thx
http://www.google.com/search?client=safari&rls=en&q=crypt.c&ie=UTF-8&oe=UTF-8
--
Chris,
Really simple. I wanna use my ftp.sh which is better than a simple ftp
and wanna use a simple file where there're login and password. But i
wanna have crypted passwords in those login/password files and wanna
decrypt that password when i need to give password to the ftp command.
Do you understand? so an app which crypt and decrypt a word
Thx
Not really. Are you writing client or server side code?
>I wanna use my ftp.sh which is better than a simple ftp
>and wanna use a simple file where there're login and password. But i
>wanna have crypted passwords in those login/password files and wanna
>decrypt that password when i need to give password to the ftp command.
Why do you want to do this?
No it's not a ftp client or server. Just use ftp in a ftp.sh to verify
return code ...
I have to decrypt. I can't use the crypt function because i have to
decrypt the password from the file login/password which i need to have
a crypted version.
I still don't understand what it is you are trying to do.
Please note that usually the passwords are never decrypted,
the authentication is done by encrypting the supplied
password. The encryption is selected so that decryption
is tedious if not nearly impossible to prevent password
theft from the encrypted file.
--
Tauno Voipio
tauno voipio (at) iki fi
> it's simple i search a function or program to crypt decrypt a word (not
> gpg please) it's so complicated to understand
>
And yet gpg is probably the simplest thing for this purpose.
Use with -symetric you don't need any public and private keys
This can help you keep the ftp password secret, but now the problem
is shiftet to keep the encryption key secret, and if the whole thing
is going to run unattended the encryption key need to be somewhere in
the program which is essential the same as storing the ftp passwords
in clear text in the program.
Notice that the C library function crypt() is not an encryption function
as the result cannot be decrypted.
Villy
They are not encrypted either, so obviously decrypting
it is not something you just do.
The principle in how DES based passwords works is that
you encrypt a fixed string using the password as key.
(Reality is a litle more complicated than this and
involves a salt and AFAIK multiple encryptions).
And MD5 based passwords are a litle different as MD5
is not even an encryption algorithm. MD5 is a hash,
which means the simplest implementation would just
concatenate the salt and the password and then hash
the resulting string. AFAIK in reallity it is more
complicated.