library dingtalk-crypto
钉钉开放平台加解密消息体(openssl版本)
hlf_513/dingtalk-crypto
钉钉开放平台加解密消息体(openssl版本)
- Monday, January 15, 2018
- by hlf513
- Repository
- 1 Watchers
- 0 Stars
- 2 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 100 % Grown
DingTalkCrypto
钉钉开放平台的消息体加解密(openssl加密版本);因为php7以后mcrypt扩展被舍弃, (*1)
Install
composer require hlf_513/dingtalk-crypto
Usage
$crypto = new Crypto(
$token,
$encodingAesKey,
$suiteKey
);
$string = 'success';
$timestamp = '1515664989185';
$nonce = '53IP1CdM';
// 加密
$ret = $crypto->encryptMsg($string, $timestamp, $nonce);
$ret = json_decode($ret, 1);
// 解密
$ret = $crypto->decryptMsg($ret['msg_signature'], $timestamp, $nonce, $ret['encrypt']);
// output: $ret === 'success'
dev-master
9999999-dev
钉钉开放平台加解密消息体(openssl版本)
Sources
Download
MIT
The Requires
-
php >=7.0.0
-
ext-openssl >=0.9.8
The Development Requires
dingtalk open-api encrypt openssl
1.0
1.0.0.0
钉钉开放平台加解密消息体(openssl版本)
Sources
Download
MIT
The Requires
-
php >=7.0.0
-
ext-openssl >=0.9.8
The Development Requires
dingtalk open-api encrypt openssl