public CRCtable(int Bits, T TruncPoly, bool Reflect) { this.Bits = Bits; this.TruncPoly = TruncPoly; this.Reflect = Reflect; masking_type = new MaskUint <T>(Bits); }
public AugmentedCRC(int Bits, T TruncPoly) { this.Bits = Bits; this.TruncPoly = TruncPoly; masking_type = new MaskUint <T>(Bits); crc_table_type = new CRCtable <T>(Bits, TruncPoly, false); crc_table_type.InitTable(); }
/// <summary> /// Конструктор ЦРЦ-вычислителя /// </summary> public CRCbasic(int Bits, T TruncPoly, T InitialRemainder, T FinalXorValue, bool ReflectInput = false, bool ReflectRemainder = false) { this.Bits = Bits; this.TruncPoly = TruncPoly; this.InitialRemainder = InitialRemainder; Remainder = InitialRemainder; this.FinalXorValue = FinalXorValue; this.ReflectInput = ReflectInput; this.ReflectRemainder = ReflectRemainder; masking_type = new MaskUint <T>(Bits); }
/// <summary> /// Конструктор ЦРЦ-вычислителя /// </summary> public CRCoptimal(int Bits, T TruncPoly, T InitialRemainder, T FinalXorValue, bool ReflectInput = false, bool ReflectRemainder = false) { this.Bits = Bits; this.ReflectInput = ReflectInput; this.FinalXorValue = FinalXorValue; this.ReflectRemainder = ReflectRemainder; this.TruncPoly = TruncPoly; this.InitialRemainder = InitialRemainder; masking_type = new MaskUint <T>(Bits); helper_type = new CRChelper <T>(Bits, ReflectInput); reflect_out_type = new CRChelper <T>(Bits, (ReflectRemainder != ReflectInput)); Remainder = helper_type.reflect(InitialRemainder); crc_table_type = new CRCtable <T>(Bits, TruncPoly, ReflectInput); crc_table_type.InitTable(); }