public static bool TestDecrypt() { string messageToDecrypt = "wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj"; string result = algorithm.Decrypt(messageToDecrypt); string correctResult = "the quick brown fox jumps over the lazy dog"; Console.WriteLine($"\nMensagem de input: {messageToDecrypt}"); Console.WriteLine($"Resultado obtido: {result}"); Console.WriteLine($"Resultado esperado: {correctResult}"); return(result == correctResult); }
static void Main(string[] args) { CesarCypher cypher = new CesarCypher(); string msgTeste = "the quick brown fox jumps over the lazy dog"; msgTeste = cypher.Crypt(msgTeste); Console.WriteLine("Encriptografada: " + msgTeste); msgTeste = cypher.Decrypt(msgTeste); Console.WriteLine("Decriptografada: " + msgTeste); }