📄 dsaparameter.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: DSAParameter.java
package jit.asn1.x509;
import java.util.Enumeration;
import jit.asn1.*;
import jit.math.BigInteger;
public class DSAParameter
implements DEREncodable
{
DERInteger p;
DERInteger q;
DERInteger g;
public static DSAParameter getInstance(ASN1TaggedObject obj, boolean explicit)
{
return getInstance(ASN1Sequence.getInstance(obj, explicit));
}
public static DSAParameter getInstance(Object obj)
{
if(obj == null || (obj instanceof DSAParameter))
return (DSAParameter)obj;
if(obj instanceof ASN1Sequence)
return new DSAParameter((ASN1Sequence)obj);
else
throw new IllegalArgumentException("Invalid DSAParameter: ".concat(String.valueOf(String.valueOf(obj.getClass().getName()))));
}
public DSAParameter(BigInteger p, BigInteger q, BigInteger g)
{
this.p = new DERInteger(p);
this.q = new DERInteger(q);
this.g = new DERInteger(g);
}
public DSAParameter(ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
p = (DERInteger)e.nextElement();
q = (DERInteger)e.nextElement();
g = (DERInteger)e.nextElement();
}
public BigInteger getP()
{
return p.getPositiveValue();
}
public BigInteger getQ()
{
return q.getPositiveValue();
}
public BigInteger getG()
{
return g.getPositiveValue();
}
public DERObject getDERObject()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(p);
v.add(q);
v.add(g);
return new DERSequence(v);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -