45 lines
1.5 KiB
Java
45 lines
1.5 KiB
Java
package org.bouncycastle.asn1;
|
|
|
|
import java.io.IOException;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public abstract class ASN1Null extends ASN1Primitive {
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@Override // org.bouncycastle.asn1.ASN1Primitive
|
|
public abstract void encode(ASN1OutputStream aSN1OutputStream) throws IOException;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Primitive, org.bouncycastle.asn1.ASN1Object
|
|
public int hashCode() {
|
|
return -1;
|
|
}
|
|
|
|
public String toString() {
|
|
return "NULL";
|
|
}
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Primitive
|
|
boolean asn1Equals(ASN1Primitive aSN1Primitive) {
|
|
return aSN1Primitive instanceof ASN1Null;
|
|
}
|
|
|
|
public static ASN1Null getInstance(Object obj) {
|
|
if (obj instanceof ASN1Null) {
|
|
return (ASN1Null) obj;
|
|
}
|
|
if (obj == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
return getInstance(ASN1Primitive.fromByteArray((byte[]) obj));
|
|
} catch (IOException e) {
|
|
StringBuilder sb = new StringBuilder("failed to construct NULL from byte[]: ");
|
|
sb.append(e.getMessage());
|
|
throw new IllegalArgumentException(sb.toString());
|
|
} catch (ClassCastException unused) {
|
|
StringBuilder sb2 = new StringBuilder("unknown object in getInstance(): ");
|
|
sb2.append(obj.getClass().getName());
|
|
throw new IllegalArgumentException(sb2.toString());
|
|
}
|
|
}
|
|
}
|