eleme.openapi.sdk.utils.IMTokenUtil Maven / Gradle / Ivy
package eleme.openapi.sdk.utils;
public class IMTokenUtil {
/**
* 生成IM toekn
* @param appkey appkey 应用账号|必选|24534212
* @param appSecret appSecret 应用密码|必选|24534212
* @return String 长链token
*/
public static String genToken(String appkey,String appSecret) {
String token = String.format("%s#%s#%s#%s", appkey, Md5Util.Md5(appSecret),ClientEnvUtils.getLocalMac(), ClientEnvUtils.getProcessID());
return new String(Base64.encodeToChar(token.getBytes(), false));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy