Esempio n. 1
0
 public void TestCaesar64EncodeA()
 {
     string testo = "ABBA";
     string codice = "D";
     string expected = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string codifica = crypt.Encode(testo, codice);
     Assert.AreEqual(expected, codifica);
 }
Esempio n. 2
0
 public void TestCaesar64EncodeNumber()
 {
     string text = "ABBA";
     int cypher = 3;
     string ris = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string encoder = crypt.Encode(text, cypher);
     Assert.AreEqual(encoder, ris);
 }
Esempio n. 3
0
 public void TestCaesar64EncodeError()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "IRCAKRA=";
     Caesar64 crypt = new Caesar64();
     string encode = crypt.Encode(text, cypher);
     Assert.AreEqual(encode, ris);
 }
Esempio n. 4
0
 public void TestCaesar64EncodeOk()
 {
     string text = "ABBA";
     string cypher = "D";
     string ris = "hUIBhQ//";
     Caesar64 crypt = new Caesar64();
     string encode = crypt.Encode(text, cypher);
     Assert.AreEqual(encode, ris);
 }