本文整理匯總了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);
}
示例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);
}
示例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;
}
示例4: BCDSTU4145PublicKey
import java.security.spec.ECPublicKeySpec; //導入方法依賴的package包/類
public BCDSTU4145PublicKey(
ECPublicKeySpec spec)
{
this.ecSpec = spec.getParams();
this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
}
示例5: BCECGOST3410PublicKey
import java.security.spec.ECPublicKeySpec; //導入方法依賴的package包/類
public BCECGOST3410PublicKey(
ECPublicKeySpec spec)
{
this.ecSpec = spec.getParams();
this.q = EC5Util.convertPoint(ecSpec, spec.getW(), false);
}