首頁 >php教程 >php手册 >谁能帮我把下面的PHP的代码翻译成C#的?,特别是PHP的hash

谁能帮我把下面的PHP的代码翻译成C#的?,特别是PHP的hash

WBOY
WBOY原創
2016-06-06 19:46:031205瀏覽

?php $app_key = '12008678';/*填写appkey */ $secret='';/*填入Appsecret'*/ $timestamp=time()."000"; $message = $secret.'app_key'.$app_key.'timestamp'.$timestamp.$secret; $mysign=strtoupper(hash_hmac("md5",$message,$secret)); setcookie("times


$app_key = '12008678';/*填写appkey */
$secret='';/*填入Appsecret'*/
$timestamp=time()."000";
$message = $secret.'app_key'.$app_key.'timestamp'.$timestamp.$secret;
$mysign=strtoupper(hash_hmac("md5",$message,$secret));
setcookie("timestamp",$timestamp);
setcookie("sign",$mysign);
?>

 

有PHP开发环镜的朋友请帮我输出一个结果:HMAC("MD5," 12342e93ab9ad9822c77b75fc9cf2d4bapp_key469115timespamp2012-10-23 21:41:2512342e93ab9ad9822c77b75fc9cf2d4b","12342e93ab9ad9822c77b75fc9cf2d4b")

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn