36 lines
1.3 KiB
Java
36 lines
1.3 KiB
Java
package org.bouncycastle.asn1.x9;
|
|
|
|
import java.math.BigInteger;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1OctetString;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.DEROctetString;
|
|
import org.bouncycastle.math.ec.ECFieldElement;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class X9FieldElement extends ASN1Object {
|
|
private static X9IntegerConverter converter = new X9IntegerConverter();
|
|
protected ECFieldElement f;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
return new DEROctetString(converter.integerToBytes(this.f.toBigInteger(), converter.getByteLength(this.f)));
|
|
}
|
|
|
|
public ECFieldElement getValue() {
|
|
return this.f;
|
|
}
|
|
|
|
public X9FieldElement(ECFieldElement eCFieldElement) {
|
|
this.f = eCFieldElement;
|
|
}
|
|
|
|
public X9FieldElement(BigInteger bigInteger, ASN1OctetString aSN1OctetString) {
|
|
this(new ECFieldElement.Fp(bigInteger, new BigInteger(1, aSN1OctetString.getOctets())));
|
|
}
|
|
|
|
public X9FieldElement(int i, int i2, int i3, int i4, ASN1OctetString aSN1OctetString) {
|
|
this(new ECFieldElement.F2m(i, i2, i3, i4, new BigInteger(1, aSN1OctetString.getOctets())));
|
|
}
|
|
}
|