40 lines
1.4 KiB
Java
40 lines
1.4 KiB
Java
package o;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
import org.spongycastle.util.encoders.DecoderException;
|
|
import org.spongycastle.util.encoders.EncoderException;
|
|
|
|
/* renamed from: o.grO, reason: case insensitive filesystem */
|
|
/* loaded from: classes6.dex */
|
|
public final class C15469grO {
|
|
private static final grQ a = new grP();
|
|
|
|
public static byte[] d(byte[] bArr) {
|
|
return e(bArr, bArr.length);
|
|
}
|
|
|
|
private static byte[] e(byte[] bArr, int i) {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(((i + 2) / 3) << 2);
|
|
try {
|
|
a.e(bArr, 0, i, byteArrayOutputStream);
|
|
return byteArrayOutputStream.toByteArray();
|
|
} catch (Exception e) {
|
|
StringBuilder sb = new StringBuilder("exception encoding base64 string: ");
|
|
sb.append(e.getMessage());
|
|
throw new EncoderException(sb.toString(), e);
|
|
}
|
|
}
|
|
|
|
public static byte[] c(String str) {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream((str.length() / 4) * 3);
|
|
try {
|
|
a.e(str, byteArrayOutputStream);
|
|
return byteArrayOutputStream.toByteArray();
|
|
} catch (Exception e) {
|
|
StringBuilder sb = new StringBuilder("unable to decode base64 string: ");
|
|
sb.append(e.getMessage());
|
|
throw new DecoderException(sb.toString(), e);
|
|
}
|
|
}
|
|
}
|