本文整理汇总了Java中org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util.convertCurve方法的典型用法代码示例。如果您正苦于以下问题:Java EC5Util.convertCurve方法的具体用法?Java EC5Util.convertCurve怎么用?Java EC5Util.convertCurve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util
的用法示例。
在下文中一共展示了EC5Util.convertCurve方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JCEECPrivateKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public JCEECPrivateKey(
String algorithm,
org.bouncycastle.jce.spec.ECPrivateKeySpec spec)
{
this.algorithm = algorithm;
this.d = spec.getD();
if (spec.getParams() != null) // can be null if implicitlyCA
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve;
ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
this.ecSpec = null;
}
}
示例2: JCEECPublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public JCEECPublicKey(
String algorithm,
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.algorithm = algorithm;
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getX().toBigInteger(), q.getY().toBigInteger(), false);
}
this.ecSpec = null;
}
}
示例3: BCDSTU4145PrivateKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCDSTU4145PrivateKey(
org.bouncycastle.jce.spec.ECPrivateKeySpec spec)
{
this.d = spec.getD();
if (spec.getParams() != null) // can be null if implicitlyCA
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve;
ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
this.ecSpec = null;
}
}
示例4: BCDSTU4145PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCDSTU4145PublicKey(
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getX().toBigInteger(), q.getY().toBigInteger(), false);
}
this.ecSpec = null;
}
}
示例5: BCECPrivateKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECPrivateKey(
String algorithm,
org.bouncycastle.jce.spec.ECPrivateKeySpec spec,
ProviderConfiguration configuration)
{
this.algorithm = algorithm;
this.d = spec.getD();
if (spec.getParams() != null) // can be null if implicitlyCA
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve;
ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
this.ecSpec = null;
}
this.configuration = configuration;
}
示例6: BCECPublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECPublicKey(
String algorithm,
ECPublicKeyParameters params,
ECParameterSpec spec,
ProviderConfiguration configuration)
{
ECDomainParameters dp = params.getParameters();
this.algorithm = algorithm;
this.q = params.getQ();
if (spec == null)
{
EllipticCurve ellipticCurve = EC5Util.convertCurve(dp.getCurve(), dp.getSeed());
this.ecSpec = createSpec(ellipticCurve, dp);
}
else
{
this.ecSpec = spec;
}
this.configuration = configuration;
}
示例7: BCECGOST3410PrivateKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECGOST3410PrivateKey(
org.bouncycastle.jce.spec.ECPrivateKeySpec spec)
{
this.d = spec.getD();
if (spec.getParams() != null) // can be null if implicitlyCA
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve;
ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
this.ecSpec = null;
}
}
示例8: BCECGOST3410PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECGOST3410PublicKey(
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getX().toBigInteger(), q.getY().toBigInteger(), false);
}
this.ecSpec = null;
}
}
示例9: JCEECPublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public JCEECPublicKey(
String algorithm,
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.algorithm = algorithm;
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getAffineXCoord().toBigInteger(), q.getAffineYCoord().toBigInteger(), false);
}
this.ecSpec = null;
}
}
示例10: BCDSTU4145PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCDSTU4145PublicKey(
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getAffineXCoord().toBigInteger(), q.getAffineYCoord().toBigInteger());
}
this.ecSpec = null;
}
}
示例11: BCECGOST3410PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECGOST3410PublicKey(
org.bouncycastle.jce.spec.ECPublicKeySpec spec)
{
this.q = spec.getQ();
if (spec.getParams() != null) // can be null if implictlyCa
{
ECCurve curve = spec.getParams().getCurve();
EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());
this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
}
else
{
if (q.getCurve() == null)
{
org.bouncycastle.jce.spec.ECParameterSpec s = BouncyCastleProvider.CONFIGURATION.getEcImplicitlyCa();
q = s.getCurve().createPoint(q.getAffineXCoord().toBigInteger(), q.getAffineYCoord().toBigInteger());
}
this.ecSpec = null;
}
}
示例12: BCDSTU4145PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCDSTU4145PublicKey(
String algorithm,
ECPublicKeyParameters params,
ECParameterSpec spec)
{
ECDomainParameters dp = params.getParameters();
this.algorithm = algorithm;
this.q = params.getQ();
if (spec == null)
{
EllipticCurve ellipticCurve = EC5Util.convertCurve(dp.getCurve(), dp.getSeed());
this.ecSpec = createSpec(ellipticCurve, dp);
}
else
{
this.ecSpec = spec;
}
}
示例13: BCECGOST3410PublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public BCECGOST3410PublicKey(
String algorithm,
ECPublicKeyParameters params,
ECParameterSpec spec)
{
ECDomainParameters dp = params.getParameters();
this.algorithm = algorithm;
this.q = params.getQ();
if (spec == null)
{
EllipticCurve ellipticCurve = EC5Util.convertCurve(dp.getCurve(), dp.getSeed());
this.ecSpec = createSpec(ellipticCurve, dp);
}
else
{
this.ecSpec = spec;
}
}
示例14: JCEECPublicKey
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
public JCEECPublicKey(
String algorithm,
ECPublicKeyParameters params,
ECParameterSpec spec)
{
ECDomainParameters dp = params.getParameters();
this.algorithm = algorithm;
this.q = params.getQ();
if (spec == null)
{
EllipticCurve ellipticCurve = EC5Util.convertCurve(dp.getCurve(), dp.getSeed());
this.ecSpec = createSpec(ellipticCurve, dp);
}
else
{
this.ecSpec = spec;
}
}
示例15: createKeyGenParamsJCE
import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; //导入方法依赖的package包/类
protected ECKeyGenerationParameters createKeyGenParamsJCE(java.security.spec.ECParameterSpec p, SecureRandom r)
{
ECCurve curve = EC5Util.convertCurve(p.getCurve());
ECPoint g = EC5Util.convertPoint(curve, p.getGenerator(), false);
BigInteger n = p.getOrder();
BigInteger h = BigInteger.valueOf(p.getCofactor());
ECDomainParameters dp = new ECDomainParameters(curve, g, n, h);
return new ECKeyGenerationParameters(dp, r);
}