You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git-test/core/aes/wxbizmsgcrypt.lib.php

24 lines
591 B

<?php
namespace LaneWeChat\Core\Aes;
class WXBizMsgCrypt
{
private $token;
private $encodingAesKey;
private $appId;
public function __construct($token, $encodingAesKey, $appId)
{
$this->token = $token;
$this->encodingAesKey = $encodingAesKey;
$this->appId = $appId;
}
public function encryptMsg($replyMsg, $timeStamp, $nonce, &$encryptMsg)
{
$pc = new Prpcrypt($this->encodingAesKey);
$array = $pc->encrypt($replyMsg, $this->appId);
$ret = $array[0];
if ($ret != 0) {
return $ret;