then i can pull it from the database and instead of showing the garbage i show 1234. crypt() appears to be a hash which means i can't retrieve the value,right? if so then what function can I use to recieve my desire result? If I'm usnig the wrong terminology please feel free to correct me.
encrypting then decrypting help
Moderator: General Moderators
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
encrypting then decrypting help
I need a user to be able to put in a number, say 1234, then store it in the database like ht30ng30n or some jazz.
then i can pull it from the database and instead of showing the garbage i show 1234. crypt() appears to be a hash which means i can't retrieve the value,right? if so then what function can I use to recieve my desire result? If I'm usnig the wrong terminology please feel free to correct me.
then i can pull it from the database and instead of showing the garbage i show 1234. crypt() appears to be a hash which means i can't retrieve the value,right? if so then what function can I use to recieve my desire result? If I'm usnig the wrong terminology please feel free to correct me.
You could use base64_encode, but thats not really true encryption, I am seeking a similar option for my portal system. Mcrypt doesn't work for me (is it because my host uses the cgi version of php, or is mcrypt a library?) Whoever answers this, can probably answer my post too.
mcrypt is an extension:
http://fr3.php.net/manual/en/ref.mcrypt.php
http://fr3.php.net/manual/en/ref.mcrypt.php