I need write php function calculating hash from password string. In MSSQL hash is calculated like:
lower(substring(convert(varchar(200), hashbytes('md5', 'my_password_string' + '|' + cast(cast(getdate() as date) as varchar(max))), 1), 3, 32))
What is php analogue of this crazy algorithm?
I tried this:
$password = hash('md5' , 'my_password_string'.'|'.date('YYYY-mm-dd'), false);
but result is not same