I encrypted password, and now trying to show in URL, but in URL i am always getting actual password which is real: kimd
I guess i am not passing $encrypted_string in url
, please check my php script and let me know that How can i pass $encrypted_string in URL
?
and whenever i call my form getting everything, details like: actual password
, encrypted password
and decrypted password
For an example:
Original upass : kimd
Encrypted upass : 5¾VªÜly.TÀîÈ¥MÜQüÑLøø‹y\ñU
Decrypted upass : kimd
legals.php:-
<?php
.......................
// Create the initialization vector for added security.
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
// Encrypt $string
$encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $secret_key, $upass, MCRYPT_MODE_CBC, $iv);
// Decrypt $string
$decrypted_string = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $secret_key, $encrypted_string, MCRYPT_MODE_CBC, $iv);
................................
?>
I just want to show encrypted password in URL
not actual password, i have two fields in legals table, namely :- uname
and upass
where i am doing mistake ? please let me know ..