本文整理汇总了Java中java.security.interfaces.ECPublicKey.getParams方法的典型用法代码示例。如果您正苦于以下问题:Java ECPublicKey.getParams方法的具体用法?Java ECPublicKey.getParams怎么用?Java ECPublicKey.getParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.security.interfaces.ECPublicKey
的用法示例。
在下文中一共展示了ECPublicKey.getParams方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serverKeyExchange
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
private void serverKeyExchange(ECDH_ServerKeyExchange mesg)
throws IOException {
if (debug != null && Debug.isOn("handshake")) {
mesg.print(System.out);
}
ECPublicKey key = mesg.getPublicKey();
ecdh = new ECDHCrypt(key.getParams(), sslContext.getSecureRandom());
ephemeralServerKey = key;
// check constraints of EC PublicKey
if (!algorithmConstraints.permits(
EnumSet.of(CryptoPrimitive.KEY_AGREEMENT), ephemeralServerKey)) {
throw new SSLHandshakeException("ECDH ServerKeyExchange " +
"does not comply to algorithm constraints");
}
}
示例2: JCEECPublicKey
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
public JCEECPublicKey(
ECPublicKey key)
{
this.algorithm = key.getAlgorithm();
this.ecSpec = key.getParams();
this.q = EC5Util.convertPoint(this.ecSpec, key.getW(), false);
}
示例3: BCDSTU4145PublicKey
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
public BCDSTU4145PublicKey(
ECPublicKey key)
{
this.algorithm = key.getAlgorithm();
this.ecSpec = key.getParams();
this.q = EC5Util.convertPoint(this.ecSpec, key.getW(), false);
}
示例4: BCECPublicKey
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
public BCECPublicKey(
ECPublicKey key,
ProviderConfiguration configuration)
{
this.algorithm = key.getAlgorithm();
this.ecSpec = key.getParams();
this.q = EC5Util.convertPoint(this.ecSpec, key.getW(), false);
}
示例5: BCECGOST3410PublicKey
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
public BCECGOST3410PublicKey(
ECPublicKey key)
{
this.algorithm = key.getAlgorithm();
this.ecSpec = key.getParams();
this.q = EC5Util.convertPoint(this.ecSpec, key.getW(), false);
}
示例6: serverKeyExchange
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
private void serverKeyExchange(ECDH_ServerKeyExchange mesg)
throws IOException {
if (debug != null && Debug.isOn("handshake")) {
mesg.print(System.out);
}
ECPublicKey key = mesg.getPublicKey();
ecdh = new ECDHCrypt(key.getParams(), sslContext.getSecureRandom());
ephemeralServerKey = key;
}
示例7: EC
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
EC(PublicKey key) throws KeyException {
super(key);
ECPublicKey ecKey = (ECPublicKey)key;
ECPoint ecPoint = ecKey.getW();
ecParams = ecKey.getParams();
try {
AccessController.doPrivileged(
new PrivilegedExceptionAction<Void>() {
public Void run() throws
ClassNotFoundException, NoSuchMethodException
{
getMethods();
return null;
}
}
);
} catch (PrivilegedActionException pae) {
throw new KeyException("ECKeyValue not supported",
pae.getException());
}
Object[] args = new Object[] { ecPoint, ecParams.getCurve() };
try {
ecPublicKey = (byte[])encodePoint.invoke(null, args);
} catch (IllegalAccessException iae) {
throw new KeyException(iae);
} catch (InvocationTargetException ite) {
throw new KeyException(ite);
}
}
示例8: EC
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
EC(PublicKey key) throws KeyException {
super(key);
ECPublicKey ecKey = (ECPublicKey)key;
ECPoint ecPoint = ecKey.getW();
ecParams = ecKey.getParams();
ecPublicKey = encodePoint(ecPoint, ecParams.getCurve());
}
示例9: ECDHClientKeyExchange
import java.security.interfaces.ECPublicKey; //导入方法依赖的package包/类
ECDHClientKeyExchange(PublicKey publicKey) {
ECPublicKey ecKey = (ECPublicKey)publicKey;
ECPoint point = ecKey.getW();
ECParameterSpec params = ecKey.getParams();
encodedPoint = JsseJce.encodePoint(point, params.getCurve());
}