/**
* 根据用户uuid获取token
* @param [type] $uuid [description]
* @return [type] [description]
*/
public function getToken($uuid)
{
$v = $uuid;
$key = mt_rand();
$hash = hash_hmac("sha1", $v . mt_rand() . time(), $key, true);
$token = str_replace('=', '', base64_encode($hash));
return $token;
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询