当前位置: 首页>>代码示例>>Java>>正文


Java EC5Util.convertCurve方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:JCEECPrivateKey.java

示例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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:26,代码来源:JCEECPublicKey.java

示例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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:BCDSTU4145PrivateKey.java

示例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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:24,代码来源:BCDSTU4145PublicKey.java

示例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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:25,代码来源:BCECPrivateKey.java

示例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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:25,代码来源:BCECPublicKey.java

示例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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:BCECGOST3410PrivateKey.java

示例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;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:24,代码来源:BCECGOST3410PublicKey.java

示例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;
    }
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:26,代码来源:JCEECPublicKey.java

示例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;
    }
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:24,代码来源:BCDSTU4145PublicKey.java

示例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;
    }
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:24,代码来源:BCECGOST3410PublicKey.java

示例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;
    }
}
 
开发者ID:mlundblad,项目名称:bc-java,代码行数:22,代码来源:BCDSTU4145PublicKey.java

示例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;
    }
}
 
开发者ID:mlundblad,项目名称:bc-java,代码行数:22,代码来源:BCECGOST3410PublicKey.java

示例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;
    }
}
 
开发者ID:mlundblad,项目名称:bc-java,代码行数:22,代码来源:JCEECPublicKey.java

示例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);
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:10,代码来源:KeyPairGeneratorSpi.java


注:本文中的org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util.convertCurve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。