alexislalas Posted May 4, 2009 Share Posted May 4, 2009 Hello all, I need to encrypt and decrypt with the DES method but I have no idea how to do it. I'v been given the following data: "keyString "= 1706090ACE45B6FD "defaultHolder" = 9FAC568D The string I want to encrypt is: 000601406077 The string ecrypted is: 323FFCB7093B9D13234052A16F11F815 I would appreciate any help of insight anybody can give me. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/ Share on other sites More sharing options...
premiso Posted May 4, 2009 Share Posted May 4, 2009 Never used this function but you can look into crypt. You can also look into using Mcrypt Ciphers and see if you cannot get them to work. Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826231 Share on other sites More sharing options...
redarrow Posted May 4, 2009 Share Posted May 4, 2009 base64 example. never seen DES please provide a link cheers. <?php $num='000601406077'; $encoded=base64_encode($num); //encoded. echo $encoded; $decoded=base64_decode($encoded); echo"<be><br>"; //decoded. echo $decoded; ?> Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826233 Share on other sites More sharing options...
premiso Posted May 4, 2009 Share Posted May 4, 2009 never seen DES please provide a link cheers. Data Encryption Standard Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826239 Share on other sites More sharing options...
Mark Baker Posted May 4, 2009 Share Posted May 4, 2009 base64 example. never seen DES please provide a link cheers. Note that base64 is really an encoding (no key is required), not an encryption. DES is an encryption Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826244 Share on other sites More sharing options...
Mark Baker Posted May 4, 2009 Share Posted May 4, 2009 base64 example. never seen DES please provide a link cheers. Note that base64 is really an encoding (no key is required and anybody can decode it), not an encryption. DES is an encryption (a key is required to decrypt and reveal the secret message) Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826245 Share on other sites More sharing options...
cringe Posted May 5, 2009 Share Posted May 5, 2009 I need to encrypt and decrypt with the DES method but I have no idea how to do it. Just so you know, from Wikipedia, "DES is now considered to be insecure for many applications. This is chiefly due to the 56-bit key size being too small." So in reality, don't use DES. Use something like AES. And I use mcrypt() for symmetric encryption. Quote Link to comment https://forums.phpfreaks.com/topic/156851-des-encryption/#findComment-826397 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.