Commit 17deec30 authored by 康帅杰's avatar 康帅杰 :speech_balloon:
Browse files

sign function

parent 3cf61eb8
Showing with 6 additions and 5 deletions
+6 -5
<?php
<?php
namespace Yjtec\Support;
class Sign
{
public static function make($secret,$timeStamp,$params,$debug=false){
public static function make($secret, $timeStamp, $params, $debug = false)
{
ksort($params);
$paramstr = '';
foreach ($params as $k => $v) {
$paramstr .= "{$k}{$v}";
}
$str = "{$secret}-{$paramstr}-{$timeStamp}";
$str = "{$secret}-{$paramstr}-{$timeStamp}";
$re['sign'] = md5($str);
if($debug){
if ($debug) {
$re['paramstr'] = $str;
}
return $re;
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment