Goedel.Cryptography.Secret.Combine C# (CSharp) Method

Combine() static private method

static private Combine ( KeyShare Shares ) : byte[]
Shares KeyShare
return byte[]
        static byte[] Combine(KeyShare[] Shares) {
            //var KeyBytes = 16; //Shares[0].Key.Length;
            var Threshold = Shares[0].Threshold;
            foreach (var Share in Shares) {
                //if (Share.Key.Length != KeyBytes) {
                //    throw new Exception("Keys must be same length");
                //    }
                if (Share.Threshold != Threshold) {
                    throw new Throw("Keys must have same threshold");
                    }
                }

            if (Shares[0].Index == 16) {
                return CombineN(Shares);
                }
            else {
                return CombineNK(Shares);
                }

            }