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


Java ECPublicKey.getParams方法代码示例

本文整理汇总了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");
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:ClientHandshaker.java

示例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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:JCEECPublicKey.java

示例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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:BCDSTU4145PublicKey.java

示例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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:9,代码来源:BCECPublicKey.java

示例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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:BCECGOST3410PublicKey.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ClientHandshaker.java

示例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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:DOMKeyValue.java

示例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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:DOMKeyValue.java

示例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());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:ECDHClientKeyExchange.java


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