lign="justify"> b = (byte) where (rot3, b);
. b = (byte) where (rot2, b);
. b = (byte) where (rot1, b);
23. return b;
. }
.
26. public byte [] Enigma_ (Int32 S1, Int32 S2, Int32 S3, byte [] file)
27. {
. rot1 = newbyte [256];
. rot2 = newbyte [256];
. rot3 = newbyte [256];
. bytetmp;
. int c1 = 0, c2 = 0, c3 = 0;
. byte [] re = newbyte [256];
.
. for (int j = 0; j <256; j + +)
. {
. re [j] = (byte) j;
. }
.
. rot1 = fill (S1);
. rot2 = fill (S2);
. rot3 = fill (S3);
.
44. for (inti = 0; i
45. {
. if (c1 <256)
. {
. c1 + +;
49. tmp = pre_refl (file [i]);
50. tmp = refl (tmp, re);
. tmp = aft_refl (tmp);
. }
. else
. {
. c1 = 1;
. turn (rot1);
. if (c2 <256)
. {
. c2 + +;
. }
. else
. {
. c2 = 1;
.