public class BaseHelper extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static AccessToken |
getAccessToken(String appid,
String secret)
获取令牌
|
static List<String> |
getServerIps(String accessToken)
获取微信服务器IP列表
|
static String |
sha1(String s)
sha1
|
static String |
shortUrl(String accessToken,
String longUrl) |
public static AccessToken getAccessToken(String appid, String secret) throws WeixinException
appid - 第三方用户唯一凭证secret - 第三方用户唯一凭证密钥,即appsecretWeixinException - WeixinExceptionpublic static List<String> getServerIps(String accessToken) throws WeixinException
accessToken - 令牌WeixinException - WeixinExceptionpublic static String shortUrl(String accessToken, String longUrl) throws WeixinException
WeixinExceptionpublic static String sha1(String s) throws NoSuchAlgorithmException
s - 原字符串NoSuchAlgorithmExceptionCopyright © 2020. All Rights Reserved.