public class DtCryptUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DtCryptUtil.PKCS7Padding |
static class |
DtCryptUtil.Utils |
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
aesKey |
protected String |
appKeyOrCorpId |
protected String |
token |
| 构造器和说明 |
|---|
DtCryptUtil(DtConfigStorage configStorage) |
DtCryptUtil(String token,
String aesKey,
String appKeyOrCorpId)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getDecryptMsg(String msgSignature,
String timeStamp,
String nonce,
String encryptMsg)
密文解密
|
Map<String,String> |
getEncryptedMap(String plaintext) |
Map<String,String> |
getEncryptedMap(String plaintext,
Long timeStamp,
String nonce)
将和钉钉开放平台同步的消息体加密,返回加密Map
|
static String |
getSignature(String token,
String timestamp,
String nonce,
String encrypt)
数字签名
|
protected byte[] aesKey
protected String token
protected String appKeyOrCorpId
public DtCryptUtil(DtConfigStorage configStorage)
public Map<String,String> getEncryptedMap(String plaintext, Long timeStamp, String nonce)
plaintext - 传递的消息体明文timeStamp - 时间戳nonce - 随机字符串public String getDecryptMsg(String msgSignature, String timeStamp, String nonce, String encryptMsg)
msgSignature - 签名串timeStamp - 时间戳nonce - 随机串encryptMsg - 密文Copyright © 2021. All rights reserved.