Trabalho sobre criptografia c++
//
// Copyright 2010 Orlando Xavier
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
// MA 02110-1301, USA. #include
#include
#include void encrypt(void); void uncrypt(void); void lowercase(char string[]); void clear(void) { system("clear"); } void getch(void) { system("read key"); } int main(int argc, char** argv) { int menu = 0; do { printf("\n\nEnter para Continuar: \n"); getch(); clear(); printf("+----------------------------+\n"); printf("|;.|\n"); printf("|^f,;+---------+--------+,j.'|\n"); printf("|&];.+---------+--------+x~};|\n"); printf("|.4-a| (3) - Exit |'.,!|\n"); printf("+----+------------------+----+\n"); printf("Escolha uma opcao: "); scanf("%d",&menu); switch (menu) { case 1: encrypt(); break; case 2: uncrypt(); break; } } while (menu != 3); return(0);
}
void encrypt(void) { char string[255]; int i = 0; clear(); printf("Entre com a palavra: "); fgets(string); fgets(string); lowercase(string); for (; string != '{FONTE}'; i++) {