\Prpcrypt

公众号消息 - 加解密 Class Prpcrypt

Summary

Methods
Properties
Constants
__construct()
encrypt()
decrypt()
getRandomStr()
$key
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$key

$key : 

Type

Methods

__construct()

__construct(  $key) 

Prpcrypt constructor.

Parameters

$key

encrypt()

encrypt(string  $text, string  $appid) : array

对明文进行加密

Parameters

string $text

需要加密的明文

string $appid

公众号APPID

Returns

array

decrypt()

decrypt(string  $encrypted) : array

对密文进行解密

Parameters

string $encrypted

需要解密的密文

Returns

array

getRandomStr()

getRandomStr(string  $str = "") : string

随机生成16位字符串

Parameters

string $str

Returns

string —

生成的字符串