note 9028 deleted from function.base64-decode by jimw
| From: | jimw@php.net | Date: | Fri, 21 Dec 2001 00:45:43 +0000 |
| Subject: | note 9028 deleted from function.base64-decode by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23684@lists.php.net to get a copy of this message | ||
[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.]
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();
...
*/
?>