$secret_id ="";
$secret_key ="";
// 确定签名的当前时间和失效时间
$current = time();
$expired = $current + 86400;  // 签名有效期:1天
// 向参数列表填入参数
$arg_list = array(
     "secretId" => $secret_id,
     "currentTimeStamp" => $current,
     "expireTime" => $expired,
     "random" => rand(),
     "procedure"=>$configpri['tx_vod_taskname'],
           
);
// 计算签名
$original = http_build_query($arg_list);
$signature = base64_encode(hash_hmac('SHA1', $original, $secret_key, true).$original);

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐