what-the-bank/sources/org/bouncycastle/jce/X509Principal.java

73 lines
2.0 KiB
Java

package org.bouncycastle.jce;
import java.io.IOException;
import java.security.Principal;
import java.util.Hashtable;
import java.util.Vector;
import org.bouncycastle.asn1.ASN1Encoding;
import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.X509Name;
/* loaded from: classes6.dex */
public class X509Principal extends X509Name implements Principal {
@Override // java.security.Principal
public String getName() {
return toString();
}
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.util.Encodable
public byte[] getEncoded() {
try {
return getEncoded(ASN1Encoding.DER);
} catch (IOException e) {
throw new RuntimeException(e.toString());
}
}
private static ASN1Sequence readSequence(ASN1InputStream aSN1InputStream) throws IOException {
try {
return ASN1Sequence.getInstance(aSN1InputStream.readObject());
} catch (IllegalArgumentException e) {
throw new IOException("not an ASN.1 Sequence: ".concat(String.valueOf(e)));
}
}
public X509Principal(byte[] bArr) throws IOException {
super(readSequence(new ASN1InputStream(bArr)));
}
public X509Principal(boolean z, Hashtable hashtable, String str) {
super(z, hashtable, str);
}
public X509Principal(boolean z, String str) {
super(z, str);
}
public X509Principal(X509Name x509Name) {
super((ASN1Sequence) x509Name.toASN1Primitive());
}
public X509Principal(X500Name x500Name) {
super((ASN1Sequence) x500Name.toASN1Primitive());
}
public X509Principal(Vector vector, Vector vector2) {
super(vector, vector2);
}
public X509Principal(Vector vector, Hashtable hashtable) {
super(vector, hashtable);
}
public X509Principal(Hashtable hashtable) {
super(hashtable);
}
public X509Principal(String str) {
super(str);
}
}