Code example for InvalidKeyException

0
            BCMcElieceCCA2PublicKey k = (BCMcElieceCCA2PublicKey)key;
 
            return new McElieceCCA2PublicKeyParameters(k.getOIDString(), k.getN(), k.getT(), k.getG(), k.getMcElieceCCA2Parameters());
        } 
 
        throw new InvalidKeyException("can't identify McElieceCCA2 public key: " + key.getClass().getName());
    } 
 
 
    static public AsymmetricKeyParameter generatePrivateKeyParameter( 
        PrivateKey key)
        throws InvalidKeyException
    { 
        if (key instanceof BCMcElieceCCA2PrivateKey)
        { 
            BCMcElieceCCA2PrivateKey k = (BCMcElieceCCA2PrivateKey)key;
            return new McElieceCCA2PrivateKeyParameters(k.getOIDString(), k.getN(), k.getK(), k.getField(), k.getGoppaPoly(),
                k.getP(), k.getH(), k.getQInv(), k.getMcElieceCCA2Parameters());
        } 
 
Connect your IDE to all the code out there  Get Codota for Java