欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

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

程序员文章站 2022-04-19 23:02:05
...

?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")