本文整理汇总了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);
}