what-the-bank/sources/org/bouncycastle/asn1/cms/OriginatorPublicKey.java

57 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.cms;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERBitString;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
/* loaded from: classes6.dex */
public class OriginatorPublicKey extends ASN1Object {
private AlgorithmIdentifier algorithm;
private DERBitString publicKey;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
aSN1EncodableVector.add(this.algorithm);
aSN1EncodableVector.add(this.publicKey);
return new DERSequence(aSN1EncodableVector);
}
public DERBitString getPublicKey() {
return this.publicKey;
}
public AlgorithmIdentifier getAlgorithm() {
return this.algorithm;
}
public static OriginatorPublicKey getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z));
}
public static OriginatorPublicKey getInstance(Object obj) {
if (obj instanceof OriginatorPublicKey) {
return (OriginatorPublicKey) obj;
}
if (obj != null) {
return new OriginatorPublicKey(ASN1Sequence.getInstance(obj));
}
return null;
}
public OriginatorPublicKey(AlgorithmIdentifier algorithmIdentifier, byte[] bArr) {
this.algorithm = algorithmIdentifier;
this.publicKey = new DERBitString(bArr);
}
public OriginatorPublicKey(ASN1Sequence aSN1Sequence) {
this.algorithm = AlgorithmIdentifier.getInstance(aSN1Sequence.getObjectAt(0));
this.publicKey = (DERBitString) aSN1Sequence.getObjectAt(1);
}
}