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


Java ECPublicKeySpec.getParams方法代码示例

本文整理汇总了Java中java.security.spec.ECPublicKeySpec.getParams方法的典型用法代码示例。如果您正苦于以下问题:Java ECPublicKeySpec.getParams方法的具体用法?Java ECPublicKeySpec.getParams怎么用?Java ECPublicKeySpec.getParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.security.spec.ECPublicKeySpec的用法示例。


在下文中一共展示了ECPublicKeySpec.getParams方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetParams

import java.security.spec.ECPublicKeySpec; //导入方法依赖的package包/类
/**
 * Test for <code>getParams()</code> method<br>
 * Assertion: returns associated EC parameters<br>
 * Test preconditions: <code>ECPublicKeySpec</code> instance
 * created using valid parameters<br>
 * Expected: must return params value which is equal
 * to the one passed to the constructor; (both must refer
 * the same object)
 */
public final void testGetParams() {
    // Valid (see note below) parameters set
    EllipticCurve c =
        new EllipticCurve(new ECFieldFp(BigInteger.valueOf(5L)),
                          BigInteger.ZERO,
                          BigInteger.valueOf(4L));
    ECPoint g = new ECPoint(BigInteger.ZERO, BigInteger.valueOf(2L));
    ECParameterSpec params =
        new ECParameterSpec(c, g, BigInteger.valueOf(5L), 10);

    ECPublicKeySpec ks = new ECPublicKeySpec(g, params);
    ECParameterSpec paramsRet = ks.getParams();
    
    assertEquals(params, paramsRet);
    assertSame(params, paramsRet);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:26,代码来源:ECPublicKeySpec_ImplTest.java

示例2: JCEECPublicKey

import java.security.spec.ECPublicKeySpec; //导入方法依赖的package包/类
public JCEECPublicKey(
    String              algorithm,
    ECPublicKeySpec     spec)
{
    this.algorithm = algorithm;
    this.ecSpec = spec.getParams();
    this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:9,代码来源:JCEECPublicKey.java

示例3: BCECPublicKey

import java.security.spec.ECPublicKeySpec; //导入方法依赖的package包/类
public BCECPublicKey(
    String algorithm,
    ECPublicKeySpec spec,
    ProviderConfiguration configuration)
{
    this.algorithm = algorithm;
    this.ecSpec = spec.getParams();
    this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
    this.configuration = configuration;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:11,代码来源:BCECPublicKey.java

示例4: BCDSTU4145PublicKey

import java.security.spec.ECPublicKeySpec; //导入方法依赖的package包/类
public BCDSTU4145PublicKey(
    ECPublicKeySpec spec)
{
    this.ecSpec = spec.getParams();
    this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:7,代码来源:BCDSTU4145PublicKey.java

示例5: BCECGOST3410PublicKey

import java.security.spec.ECPublicKeySpec; //导入方法依赖的package包/类
public BCECGOST3410PublicKey(
    ECPublicKeySpec spec)
{
    this.ecSpec = spec.getParams();
    this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:7,代码来源:BCECGOST3410PublicKey.java


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