コード例 #1
0
 public string Encrypt(string number)
 {
     if (this.CypheredNumbers.Count < 12)
     {
         RowTransposition rowTransposition = new RowTransposition(keys[this.CypheredNumbers.Count]);
         string temp = rowTransposition.Encrypt(number);
         this.CypheredNumbers.Add(temp);
         return temp;
     }
     else
     {
         return "cannotEncrypt";
     }
 }
コード例 #2
0
 public static string Decrypt(string cyphered)
 {
     RowTransposition temp = new RowTransposition(new int[] { 4, 3, 1, 2, 5 });
     return temp.Decrypt(cyphered);
 }