Skip to content

Commit

Permalink
添加验证校验码函数
Browse files Browse the repository at this point in the history
  • Loading branch information
salamander committed Dec 20, 2018
1 parent bfdd35d commit 6995eab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Entrance.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@ public function chatRoom() {
}
return $this->instances[$key];
}


/**
* 抄送消息验证检验码
* @param $body
* @param $curTime
* @param $checksumPost
* @return bool
*/
public function isLegalChecksum($body, $curTime, $checksumPost) {
return sha1($this->appSecrt . md5($body), $curTime) === $checksumPost;
}
}

0 comments on commit 6995eab

Please sign in to comment.