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());
}
throw new InvalidKeyException("can't identify McElieceCCA2 private key.");
}