mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 01:18:36 +08:00
🎨 避免对曾变化的guava方法的依赖,以免对使用不同版本guava的用户造成困惑
This commit is contained in:
@ -20,6 +20,9 @@ package me.chanjar.weixin.mp.util.crypto;
|
||||
import com.google.common.base.CharMatcher;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import me.chanjar.weixin.mp.config.WxMpConfigStorage;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Base64;
|
||||
|
||||
public class WxMpCryptUtil extends me.chanjar.weixin.common.util.crypto.WxCryptUtil {
|
||||
|
||||
@ -40,7 +43,7 @@ public class WxMpCryptUtil extends me.chanjar.weixin.common.util.crypto.WxCryptU
|
||||
|
||||
this.token = token;
|
||||
this.appidOrCorpid = appId;
|
||||
this.aesKey = BaseEncoding.base64().decode(CharMatcher.whitespace().removeFrom(encodingAesKey));
|
||||
this.aesKey = Base64.getDecoder().decode(StringUtils.remove(encodingAesKey, " "));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user