what-the-bank/sources/org/bouncycastle/asn1/icao/LDSVersionInfo.java

54 lines
1.8 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.icao;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERPrintableString;
import org.bouncycastle.asn1.DERSequence;
/* loaded from: classes6.dex */
public class LDSVersionInfo extends ASN1Object {
private DERPrintableString ldsVersion;
private DERPrintableString unicodeVersion;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
aSN1EncodableVector.add(this.ldsVersion);
aSN1EncodableVector.add(this.unicodeVersion);
return new DERSequence(aSN1EncodableVector);
}
public String getUnicodeVersion() {
return this.unicodeVersion.getString();
}
public String getLdsVersion() {
return this.ldsVersion.getString();
}
public static LDSVersionInfo getInstance(Object obj) {
if (obj instanceof LDSVersionInfo) {
return (LDSVersionInfo) obj;
}
if (obj != null) {
return new LDSVersionInfo(ASN1Sequence.getInstance(obj));
}
return null;
}
private LDSVersionInfo(ASN1Sequence aSN1Sequence) {
if (aSN1Sequence.size() != 2) {
throw new IllegalArgumentException("sequence wrong size for LDSVersionInfo");
}
this.ldsVersion = DERPrintableString.getInstance(aSN1Sequence.getObjectAt(0));
this.unicodeVersion = DERPrintableString.getInstance(aSN1Sequence.getObjectAt(1));
}
public LDSVersionInfo(String str, String str2) {
this.ldsVersion = new DERPrintableString(str);
this.unicodeVersion = new DERPrintableString(str2);
}
}