note 10059 added to md5

From: Date: Mon, 11 Dec 2000 08:09:37 +0000
Subject: note 10059 added to md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-8606@lists.php.net to get a copy of this message
Using IP as part of MD5 is a good idea... But, the security itself depend on how you implement it ... If DES has triple-DES, I would like to introduce triple-RMD5 ! $key1 = "This is key number 1"; $key2 = "This is key number 2"; $key3 = "This is key number 3"; $text = "Lion eats rabbit"; $enc = base64_encode(keyED(encrypt(keyED($text,$key1),$key2),$key3)); $dec = keyED(decrypt(keyED(base64_decode($enc),$key3),$key2),$key1); print " Original text : $text Encrypted : $enc Decrypted : $dec"; With same encrypting logic as my previous comment, it will give result : Original text : Lion eats rabbit Encrypted : bA8SaDsTLCszDQ43Yyd/ejAyYnsmDS5gZlhneHZuKmRvJ1tnNRMdBiEzA1s= Decrypted : Lion eats rabbit I would like to kiss someone that can reverse my encrypted text without knowing my $key1, $key2 and $key3 ... smack.. smaaackk ... :P Alexander Yanuar K. SYSTEM DEVELOPER www.globalsources.com http://www.php.net/manual/function.md5.php

« previous php.notes (#8606) next »