what-the-bank/sources/o/gnD.java

108 lines
3.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
/* loaded from: classes6.dex */
public abstract class gnD extends AbstractC15315gnE implements InterfaceC15313gnA {
byte[] b;
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC15315gnE
public abstract void c(gnG gng) throws IOException;
public static gnD b(AbstractC15321gnP abstractC15321gnP) {
InterfaceC15342gnr interfaceC15342gnr = abstractC15321gnP.d;
AbstractC15315gnE i = interfaceC15342gnr != null ? interfaceC15342gnr.i() : null;
if (i instanceof gnD) {
return b(i);
}
AbstractC15317gnH a = AbstractC15317gnH.a(i);
gnD[] gndArr = new gnD[a.e()];
Enumeration b = a.b();
int i2 = 0;
while (b.hasMoreElements()) {
gndArr[i2] = (gnD) b.nextElement();
i2++;
}
return new gnV(gndArr);
}
public static gnD b(Object obj) {
if (obj == null || (obj instanceof gnD)) {
return (gnD) obj;
}
if (obj instanceof byte[]) {
try {
return b(AbstractC15315gnE.b((byte[]) obj));
} catch (IOException e) {
StringBuilder sb = new StringBuilder("failed to construct OCTET STRING from byte[]: ");
sb.append(e.getMessage());
throw new IllegalArgumentException(sb.toString());
}
}
if (obj instanceof InterfaceC15342gnr) {
AbstractC15315gnE i = ((InterfaceC15342gnr) obj).i();
if (i instanceof gnD) {
return (gnD) i;
}
}
StringBuilder sb2 = new StringBuilder("illegal object in getInstance: ");
sb2.append(obj.getClass().getName());
throw new IllegalArgumentException(sb2.toString());
}
public gnD(byte[] bArr) {
if (bArr == null) {
throw new NullPointerException("string cannot be null");
}
this.b = bArr;
}
@Override // o.InterfaceC15313gnA
public final InputStream e() {
return new ByteArrayInputStream(this.b);
}
@Override // o.AbstractC15346gnv
public int hashCode() {
return grK.c(b());
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC15315gnE
protected final boolean e(AbstractC15315gnE abstractC15315gnE) {
if (abstractC15315gnE instanceof gnD) {
return grK.b(this.b, ((gnD) abstractC15315gnE).b);
}
return false;
}
@Override // o.goR
public final AbstractC15315gnE a() {
return i();
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC15315gnE
public final AbstractC15315gnE h() {
return new C15382gov(this.b);
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // o.AbstractC15315gnE
public final AbstractC15315gnE f() {
return new C15382gov(this.b);
}
public String toString() {
return "#".concat(new String(grS.c(this.b)));
}
public byte[] b() {
return this.b;
}
}