Exemplo n.º 1
0
 public void Test_GetInt()
 {
     Assert.AreEqual(0, EnigmaHelper.GetInt('A'));
     Assert.AreEqual(4, EnigmaHelper.GetInt('E'));
     Assert.AreEqual(25, EnigmaHelper.GetInt('Z'));
 }
Exemplo n.º 2
0
 public char Encipher(char input)
 {
     return(EnigmaHelper.GetCharCyclic(EnigmaHelper.GetInt(input) + shift));
 }
Exemplo n.º 3
0
 public void Test_GetChar()
 {
     Assert.AreEqual(0, EnigmaHelper.GetInt('A'));
     Assert.AreEqual(16, EnigmaHelper.GetInt('Q'));
     Assert.AreEqual(25, EnigmaHelper.GetInt('Z'));
 }
Exemplo n.º 4
0
 public char Encipher(char input)
 {
     return(mapping[EnigmaHelper.GetInt(input)]);
 }