what-the-bank/sources/okhttp3/Credentials.java

46 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import o.C14957gcv;
import o.C15155gij;
/* loaded from: classes.dex */
public final class Credentials {
public static final Credentials INSTANCE = new Credentials();
private Credentials() {
}
public static /* synthetic */ String basic$default(String str, String str2, Charset charset, int i, Object obj) {
if ((i & 4) != 0) {
charset = StandardCharsets.ISO_8859_1;
C14957gcv.c(charset, "");
}
return basic(str, str2, charset);
}
public static final String basic(String str, String str2, Charset charset) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
C14957gcv.e(charset, "");
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(':');
sb.append(str2);
String obj = sb.toString();
C15155gij.LWm lWm = C15155gij.c;
C14957gcv.e(obj, "");
C14957gcv.e(charset, "");
byte[] bytes = obj.getBytes(charset);
C14957gcv.c(bytes, "");
return C14957gcv.c("Basic ", (Object) new C15155gij(bytes).e());
}
public static final String basic(String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
return basic$default(str, str2, null, 4, null);
}
}