Standard DES encryption script?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bugmenot
Forum Newbie
Posts: 23
Joined: Fri Oct 10, 2008 11:44 am

Standard DES encryption script?

Post by bugmenot »

Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt into standard DES?

I know about the crypt()-function, but I'm currently writing a PHP script that should be working on whatever server it's on and it should always encrypt to standard DES, no matter what encryption is actually defined (MD5 etc.) on the server.

Alternatively, if someone knows a short script to create a "tripcode" with salt, tell me please.
lipun4u
Forum Commoner
Posts: 82
Joined: Wed Jul 01, 2009 3:35 am
Location: Mumbai
Contact:

Re: Standard DES encryption script?

Post by lipun4u »

I made a google search and found this

Code: Select all

 
<?php
if (CRYPT_STD_DES == 1) { // If standard DES is installed
   crypt($string, 'ds'); // encrypt $string using the salt 'ds'
}
?>
 
bugmenot
Forum Newbie
Posts: 23
Joined: Fri Oct 10, 2008 11:44 am

Re: Standard DES encryption script?

Post by bugmenot »

Read what I wrote before doing a Google search.
lipun4u
Forum Commoner
Posts: 82
Joined: Wed Jul 01, 2009 3:35 am
Location: Mumbai
Contact:

Re: Standard DES encryption script?

Post by lipun4u »

hmmm...my mistake...... :banghead: :banghead: :banghead: :banghead: :banghead: :banghead:
Post Reply