package org.bouncycastle.asn1.cryptopro; import java.util.Enumeration; import org.bouncycastle.asn1.ASN1EncodableVector; import org.bouncycastle.asn1.ASN1Object; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1OctetString; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.ASN1TaggedObject; import org.bouncycastle.asn1.DERSequence; import org.bouncycastle.util.Arrays; /* loaded from: classes6.dex */ public class GOST28147Parameters extends ASN1Object { private ASN1OctetString iv; private ASN1ObjectIdentifier paramSet; @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable public ASN1Primitive toASN1Primitive() { ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector(); aSN1EncodableVector.add(this.iv); aSN1EncodableVector.add(this.paramSet); return new DERSequence(aSN1EncodableVector); } public byte[] getIV() { return Arrays.clone(this.iv.getOctets()); } public ASN1ObjectIdentifier getEncryptionParamSet() { return this.paramSet; } public static GOST28147Parameters getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) { return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z)); } public static GOST28147Parameters getInstance(Object obj) { if (obj instanceof GOST28147Parameters) { return (GOST28147Parameters) obj; } if (obj != null) { return new GOST28147Parameters(ASN1Sequence.getInstance(obj)); } return null; } public GOST28147Parameters(ASN1Sequence aSN1Sequence) { Enumeration objects = aSN1Sequence.getObjects(); this.iv = (ASN1OctetString) objects.nextElement(); this.paramSet = (ASN1ObjectIdentifier) objects.nextElement(); } }