Code example for DHPublicKey

Methods: getParamsgetY

0
        } 
        else if (spec.isAssignableFrom(DHPublicKeySpec.class) && key instanceof DHPublicKey)
        { 
            DHPublicKey k = (DHPublicKey)key;
 
            return new DHPublicKeySpec(k.getY(), k.getParams().getP(), k.getParams().getG());
        } 
 
        return super.engineGetKeySpec(key, spec);
    } 
 
    protected Key engineTranslateKey(
        Key key)
        throws InvalidKeyException 
    { 
        if (key instanceof DHPublicKey)
        { 
            return new BCDHPublicKey((DHPublicKey)key);
        } 
        else if (key instanceof DHPrivateKey)
        {