🎨 避免对曾变化的guava方法的依赖,以免对使用不同版本guava的用户造成困惑

This commit is contained in:
Binary Wang
2022-07-24 21:59:47 +08:00
parent 7cd213da65
commit 0cfcc8d4a0
8 changed files with 28 additions and 19 deletions

View File

@ -3,6 +3,9 @@ package me.chanjar.weixin.open.util;
import com.google.common.base.CharMatcher;
import com.google.common.io.BaseEncoding;
import me.chanjar.weixin.open.api.WxOpenConfigStorage;
import org.apache.commons.lang3.StringUtils;
import java.util.Base64;
/**
* @author <a href="https://github.com/007gzs">007</a>
@ -25,6 +28,6 @@ public class WxOpenCryptUtil extends me.chanjar.weixin.common.util.crypto.WxCryp
this.token = token;
this.appidOrCorpid = appId;
this.aesKey = BaseEncoding.base64().decode(CharMatcher.whitespace().removeFrom(encodingAesKey));
this.aesKey = Base64.getDecoder().decode(StringUtils.remove(encodingAesKey, " "));
}
}