throws IOException, ClassNotFoundException, InvalidVSSScheme {
PVSSEngine engine = PVSSEngine.getInstance(reg.info);
Share[] orderedShares = new Share[N];
//share ordering for recombination to process or else it fails
for (int i = 0; i < shares.length; i++) {
Share s = shares[i];
if (s == null) {
continue;
}
orderedShares[s.getIndex()] = s;
}
return engine.generalCombineShares(orderedShares);
}