PHP Class Prpcrypt

Afficher le fichier Open project: dodgepudding/wechat-php-sdk Class Usage Examples

Méthodes publiques

Свойство Type Description
$key

Méthodes publiques

Méthode Description
Prpcrypt ( $k ) 兼容老版本php构造函数,不能在 __construct() 方法前边,否则报错
__construct ( $k )
decrypt ( string $encrypted, $appid ) : string 对密文进行解密
encrypt ( string $text, $appid ) : string 对明文进行加密
getRandomStr ( ) : string 随机生成16位字符串

Method Details

Prpcrypt() public méthode

兼容老版本php构造函数,不能在 __construct() 方法前边,否则报错
public Prpcrypt ( $k )

__construct() public méthode

public __construct ( $k )

decrypt() public méthode

对密文进行解密
public decrypt ( string $encrypted, $appid ) : string
$encrypted string 需要解密的密文
Résultat string 解密得到的明文

encrypt() public méthode

对明文进行加密
public encrypt ( string $text, $appid ) : string
$text string 需要加密的明文
Résultat string 加密后的密文

getRandomStr() public méthode

随机生成16位字符串
public getRandomStr ( ) : string
Résultat string 生成的字符串

Property Details

$key public_oe property

public $key