2017 © Pedro Peláez
 

library dingtalk-crypto

钉钉开放平台加解密消息体(openssl版本)

image

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

The README.md

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'

The Versions

15/01 2018

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

15/01 2018

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