what-the-bank/sources/org/bouncycastle/asn1/mozilla/PublicKeyAndChallenge.java

44 lines
1.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.mozilla;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERIA5String;
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
/* loaded from: classes6.dex */
public class PublicKeyAndChallenge extends ASN1Object {
private DERIA5String challenge;
private ASN1Sequence pkacSeq;
private SubjectPublicKeyInfo spki;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.pkacSeq;
}
public SubjectPublicKeyInfo getSubjectPublicKeyInfo() {
return this.spki;
}
public DERIA5String getChallenge() {
return this.challenge;
}
public static PublicKeyAndChallenge getInstance(Object obj) {
if (obj instanceof PublicKeyAndChallenge) {
return (PublicKeyAndChallenge) obj;
}
if (obj != null) {
return new PublicKeyAndChallenge(ASN1Sequence.getInstance(obj));
}
return null;
}
private PublicKeyAndChallenge(ASN1Sequence aSN1Sequence) {
this.pkacSeq = aSN1Sequence;
this.spki = SubjectPublicKeyInfo.getInstance(aSN1Sequence.getObjectAt(0));
this.challenge = DERIA5String.getInstance(aSN1Sequence.getObjectAt(1));
}
}