39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
package o;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
import org.spongycastle.util.encoders.DecoderException;
|
|
import org.spongycastle.util.encoders.EncoderException;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class grS {
|
|
private static final grQ e = new grT();
|
|
|
|
public static byte[] c(byte[] bArr) {
|
|
return e(bArr, 0, bArr.length);
|
|
}
|
|
|
|
public static byte[] e(byte[] bArr, int i, int i2) {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
try {
|
|
e.e(bArr, i, i2, byteArrayOutputStream);
|
|
return byteArrayOutputStream.toByteArray();
|
|
} catch (Exception e2) {
|
|
StringBuilder sb = new StringBuilder("exception encoding Hex string: ");
|
|
sb.append(e2.getMessage());
|
|
throw new EncoderException(sb.toString(), e2);
|
|
}
|
|
}
|
|
|
|
public static byte[] b(String str) {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
try {
|
|
e.e(str, byteArrayOutputStream);
|
|
return byteArrayOutputStream.toByteArray();
|
|
} catch (Exception e2) {
|
|
StringBuilder sb = new StringBuilder("exception decoding Hex string: ");
|
|
sb.append(e2.getMessage());
|
|
throw new DecoderException(sb.toString(), e2);
|
|
}
|
|
}
|
|
}
|