mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 规范部分javadoc文档
This commit is contained in:
@@ -1,52 +1,30 @@
|
||||
/**
|
||||
* 对公众平台发送给公众账号的消息加解密示例代码.
|
||||
*
|
||||
* @copyright Copyright (c) 1998-2014 Tencent Inc.
|
||||
* <p>
|
||||
* 针对org.apache.commons.codec.binary.Base64,
|
||||
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
|
||||
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
|
||||
* <p>
|
||||
* 针对org.apache.commons.codec.binary.Base64,
|
||||
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
|
||||
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
|
||||
*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* 针对org.apache.commons.codec.binary.Base64,
|
||||
* 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本)
|
||||
* 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi
|
||||
*/
|
||||
package me.chanjar.weixin.cp.util.crypto;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
|
||||
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
|
||||
|
||||
public class WxCpTpCryptUtil extends WxCryptUtil {
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*
|
||||
* @param wxCpConfigStorage
|
||||
*/
|
||||
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
|
||||
/*
|
||||
* @param token 公众平台上,开发者设置的token
|
||||
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
|
||||
* @param appidOrCorpid 公众平台corpId
|
||||
*/
|
||||
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
|
||||
String token = wxCpTpConfigStorage.getToken();
|
||||
String corpId = wxCpTpConfigStorage.getCorpId();
|
||||
|
||||
this.token = token;
|
||||
this.appidOrCorpid = corpId;
|
||||
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package me.chanjar.weixin.cp.util.crypto;
|
||||
|
||||
import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
|
||||
import me.chanjar.weixin.cp.config.WxCpTpConfigStorage;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
/**
|
||||
* @author someone
|
||||
*/
|
||||
public class WxCpTpCryptUtil extends WxCryptUtil {
|
||||
/**
|
||||
* 构造函数.
|
||||
*/
|
||||
public WxCpTpCryptUtil(WxCpTpConfigStorage wxCpTpConfigStorage) {
|
||||
/*
|
||||
* @param token 公众平台上,开发者设置的token
|
||||
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey
|
||||
* @param appidOrCorpid 公众平台corpId
|
||||
*/
|
||||
String encodingAesKey = wxCpTpConfigStorage.getAesKey();
|
||||
String token = wxCpTpConfigStorage.getToken();
|
||||
String corpId = wxCpTpConfigStorage.getCorpId();
|
||||
|
||||
this.token = token;
|
||||
this.appidOrCorpid = corpId;
|
||||
this.aesKey = Base64.decodeBase64(encodingAesKey + "=");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user