return new PKCS8EncodedKeySpec(key.getEncoded());
}
else if (McEliecePrivateKeySpec.class.isAssignableFrom(keySpec))
{
BCMcEliecePrivateKey privKey = (BCMcEliecePrivateKey)key;
return new McEliecePrivateKeySpec(OID, privKey.getN(), privKey
.getK(), privKey.getField(), privKey.getGoppaPoly(),
privKey.getSInv(), privKey.getP1(), privKey.getP2(),
privKey.getH(), privKey.getQInv());
}
}