Answer the question
In order to leave comments, you need to log in
How to check Membership password from ASP.NET in PHP site?
I have an ASP.NET MVC 3 site and it needs to be rewritten in PHP. Authorization on the site is done using the ASP.NET Membership class. The ASP application config contains passwordFormat="Encrypted". For a long time I tried to find information on the Internet how this method of storing a password works, but basically everywhere it is written about the Hashed format. I found one site that described the password encryption algorithm. It says that a salt is added to the password, then it is encrypted (because the decryption method is not specified, as I understand it is AES by default). But after trying to decrypt it with the function
function decodePassword($encrypted_pass, $decr_key){
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
return mcrypt_decrypt(MCRYPT_RIJNDAEL_192, $decr_key, base64_decode($encrypted_pass), MCRYPT_MODE_CBC, $iv);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question