Re: Crypt Function-- Encryption and Decryption
| From: | Rens Admiraal | Date: | Sun, 21 Nov 2004 15:22:27 +0000 |
| Subject: | Re: Crypt Function-- Encryption and Decryption | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202596@lists.php.net to get a copy of this message | ||
What would be the use of a hash if it was easy to recover ?
You can use it by storing the hash of a password, en when the user supplies you his password in a script, you hash it again... and compare those two hashes...
Trying to recover the value from which the hash is the result is called cracking, and no programming!
Jon-EIrik Pettersen wrote:
Mulley, Nikhil wrote:Hi All, I have a password file , which has all the passwords words encrypted with the Crypt Function I know that Crypt uses one-way algorithm to generate the encryptions and PHP has no Decrypt function , ( but can it be developed to have one ?) But I am eager to know whether it is really impossible to decrypt the passwords , if possible , how it caqn be done. like salts and all Can somebody *please* throw more light on Crypt() and Encryption and Decryption in this thread. Thanks, NikhilAs far as I know the standard crypto-methots used in crypt() is one-way-hashing. The data used when encrypting is lost, the encrypted data is generated using this data. There is no other methods to get these data back other than brute-forcing (guess, encrypt with the same algorithm and compare) but it may take months/years depending on the size of the orginal data.