public CompressedPermutedKey(BitArray leftSource, BitArray rightSource) { this.SourceHalves = new HalvesBlock(leftSource, rightSource); this.CompressedValue = leftSource .Concat(rightSource) .Transform(PermutationTable, tableStartIndex: 1); }
public static BitArray CycleLeftShift(this BitArray bits, int shift) { BitArray shiftedPart = bits.GetRange(0, shift); BitArray mainPart = bits.GetRange(shift, bits.Length - shift); BitArray result = mainPart.Concat(shiftedPart); return(result); }