private void btnLoadKey_Click(object sender, EventArgs e) { try { using (StreamReader sr = new StreamReader("./key.txt")) { String line = sr.ReadToEnd(); mls = new MLS(Convert.ToInt64(line)); } } catch (Exception a) { MessageBox.Show(a.Message); } }
static void Main(string[] args) { MLS mls = new MLS(); mls = new MLS(15); mls.PrintByte(mls.Reg); for (int i = 0; i < 40; i++) { mls.PrintByte(mls.ShiftTest()); } Console.WriteLine(); mls = new MLS(15); for (int i = 0; i < 40; i++) { Console.Write(mls.getBitTest()); } Console.Read(); }