Preventing password in the clear with PHP

Posted under » PHP » LAMP Security on 3 June 2015

When you want to hide it.. use base64_encode() - Encodes data with MIME base64.

When you want to show it, you use base64_decode().

	$USER = "c3VsbWFya2Vyc193d3c=";
	$ePWD = "YmlvaW5nODQ=";

    $username = base64_decode($USER);
    $pwd = base64_decode($ePWD);

echo "<p>".$username;
echo "<p>".$pwd;

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data