Page 1 of 1

Standard DES encryption script?

Posted: Thu Oct 22, 2009 2:17 pm
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.

Re: Standard DES encryption script?

Posted: Thu Oct 22, 2009 4:36 pm
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'
}
?>
 

Re: Standard DES encryption script?

Posted: Fri Oct 23, 2009 10:31 am
by bugmenot
Read what I wrote before doing a Google search.

Re: Standard DES encryption script?

Posted: Fri Oct 23, 2009 12:38 pm
by lipun4u
hmmm...my mistake...... :banghead: :banghead: :banghead: :banghead: :banghead: :banghead: