Re: note 9028 added to base64_decode

From: Date: Thu, 12 Oct 2000 21:05:04 +0000
Subject: Re: note 9028 added to base64_decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-6412@lists.php.net to get a copy of this message
Your tip is not more secure than using clear/plain text information. I added the following comment to your note: " [Editor's note: This solution does not afford any degree of security over the plain text, because if someone can read the source code of the script containing the encoded, it is not difficult to just decode the base64 string and get back the clear text information. Use this tip under your own risk.] " Controlling include dir access is a better solution. --- uioreanu@hotmail.com wrote: > Hello. I am Calin from Romania. > Here is a way to try to hide the > user/pass or smth from immediate: > <? > $username = "loosername"; > $userpass = "nopassword"; > > echo "<br> <font face=arial size=2>encoded username > ". base64_encode($username); > echo "<br> encoded userpass ". > base64_encode($userpass); > > // after cut & paste from browser > > $username = base64_decode("bG9vc2VybmFtZQ=="); > $userpass = base64_decode("bm9wYXNzd29yZA=="); > > echo "<br> .. after decrypt"; > echo "<br> username <b>".$username; > echo "</b><br> userpass <b>". $userpass; > > /* > $db = new MySQL ; > $db->init(); > ... > */ > ?> > > > http://www.php.net/manual/function.base64-decode.php > > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.notes (#6412) next »