Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

PHP DES Encryption key


ghost's Avatar
0 0

Hi,

I'm coding a encrypt/decrypt tool in .NET (C#) and i'm stuck on DES Encryption part. I have to get the same result as Yellowpipe or BlackFire online tools (which should be based on php crypt function i think) but for this i need to know the default private key used by php to encrypt DES. I searched the PHP 5.2.3 source code but cannot find anything. Can someone help me ? Thanks.


ghost's Avatar
0 0

blackfire security uses exactly this line of code :P : $text = crypt($text, 'CRYPT_STD_DES' ) ; :happy: this would be UNsalted,stantard DES encryption, of which the algorithm specification was published in January 1977 ^^ //darksun

[edit] nice avatar…doe mij er maar 1 als ze koud staan :happy: [/edit]


ghost's Avatar
0 0

'CRYPT_STD_DES' is provided as string or is it a constant ?


ghost's Avatar
0 0

its just part of the function? crypt(CRYPT_STD_DES("yourtexthere " ));

also,i was wrong about it being an UNsalted encryption. it IS salted,with a 2 character salt. i hope that helps.


ghost's Avatar
0 0

do you know the values of the default 2 char salt ?