當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。