asp.net - Sitefinity Password Hash in PHP -


i'm working on project requires using client's existing sitefinity database user logins. i'm able build in php, , trying hash passwords in php, , compare them hashed passwords in sitefinity database.

i'm came across, this question, explains how sitefinity it's hashing, , started, don't understand it's written in asp. need find if there's php equivalent , how work.

i've searched online guidance no luck far. appreciated.

in php code checking sitefinity hash looks like:

<?php     //clear password     $passwordinput = "password";      //from sf_users column [salt]     $usersalt = "2e1c1cef99e6ef066e9c803974d17419";      //from sf_users column [passwd]     $userpassword = "g1mjijw3zpbvdzbkvizufevtpza=";      //from app_data\sitefinity\configuration\securityconfig.config attribute "validationkey"     $validationkey = "24152ec6e594970cbea98b5c10d878d65ef73964aaf44f1ccd3e0fbe95a5f2efc89c0124b9b025581d38ed6ec846453249fd998abdae9453302b8bab97ba1d0c";      $str = $passwordinput.$usersalt;      $utfstring  = mb_convert_encoding($str, "utf-16le");      echo $userpassword == base64_encode(hash_hmac('sha1', $utfstring, hex2bin($validationkey), true))? 'true' : 'false';  ?> 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -