正在查看: Biko v2.0.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Biko v2.0.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.tencent.aai.task.net;
import android.text.TextUtils;
import com.stripe.android.networking.FraudDetectionData;
import com.tencent.aai.auth.AbsCredentialProvider;
import com.tencent.aai.model.AudioRecognizeRequest;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import p003do.Cif;
public class c {
public static String a(Map<String, String> map) {
if (map == null || map.isEmpty()) {
return null;
}
StringBuilder sb = new StringBuilder();
boolean z = true;
for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
if (!z) {
sb.append("&");
}
sb.append(key);
sb.append("=");
sb.append(value);
z = false;
}
return sb.toString();
}
public static String a(Map<String, String> map, com.tencent.aai.task.config.b bVar, AbsCredentialProvider absCredentialProvider) {
String a = a(map);
if (TextUtils.isEmpty(a)) {
return "wss://asr.cloud.tencent.com/asr/v2/";
}
String encode = URLEncoder.encode(absCredentialProvider.getAudioRecognizeSign(String.format(Locale.CHINESE, "%s%s%s?%s", "asr.cloud.tencent.com", "/asr/v2/", Integer.valueOf(bVar.a()), a)), "UTF-8");
StringBuilder m1134do = Cif.m1134do("wss://asr.cloud.tencent.com/asr/v2/");
m1134do.append(bVar.a());
m1134do.append("?");
m1134do.append(a);
m1134do.append("&signature=");
m1134do.append(encode);
return m1134do.toString();
}
public static Map<String, String> a(String str, AudioRecognizeRequest audioRecognizeRequest, com.tencent.aai.task.config.b bVar) {
com.tencent.aai.task.net.networktime.c.c().d();
audioRecognizeRequest.UpdateTimestamp();
audioRecognizeRequest.getEngineModelType();
TreeMap treeMap = new TreeMap();
for (String str2 : audioRecognizeRequest.getApiParams().keySet()) {
treeMap.put(str2, String.valueOf(audioRecognizeRequest.getApiParam(str2)));
}
treeMap.put("secretid", bVar.b());
treeMap.put("voice_id", str);
treeMap.put(FraudDetectionData.KEY_TIMESTAMP, String.valueOf(com.tencent.aai.task.net.networktime.c.c().a() + audioRecognizeRequest.getTimestamp()));
treeMap.put("expired", String.valueOf(com.tencent.aai.task.net.networktime.c.c().a() + audioRecognizeRequest.getTimestamp() + 36000));
treeMap.put("nonce", String.valueOf(com.tencent.aai.task.net.networktime.c.c().a() + audioRecognizeRequest.getTimestamp()));
treeMap.put("voice_format", String.valueOf(audioRecognizeRequest.getVoice_format()));
return treeMap;
}
}