31 lines
872 B
Java
31 lines
872 B
Java
package com.ubtrobot.okhttp.interceptor.sign;
|
|
|
|
import java.math.BigInteger;
|
|
import java.security.MessageDigest;
|
|
import java.security.NoSuchAlgorithmException;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class URestSigner {
|
|
private final String a;
|
|
|
|
public URestSigner(String str) {
|
|
this.a = str;
|
|
}
|
|
|
|
public String a(String str, long j, String str2) {
|
|
return a(j + this.a + str2 + str) + " " + j + " " + str2 + " v2";
|
|
}
|
|
|
|
private String a(String str) {
|
|
try {
|
|
String bigInteger = new BigInteger(1, MessageDigest.getInstance("MD5").digest(str.getBytes())).toString(16);
|
|
while (bigInteger.length() < 32) {
|
|
bigInteger = "0" + bigInteger;
|
|
}
|
|
return bigInteger;
|
|
} catch (NoSuchAlgorithmException e) {
|
|
throw new IllegalStateException(e);
|
|
}
|
|
}
|
|
}
|