Trabalho sobre criptografia c++

Disponível somente no TrabalhosFeitos
  • Páginas : 2 (334 palavras )
  • Download(s) : 0
  • Publicado : 26 de outubro de 2011
Ler documento completo
Amostra do texto
//      cripto_teste.c
//      
//      Copyright 2010 Orlando Xavier
//      
//      This program is free software; you can redistribute it and/or modify
//      it under the terms of the GNUGeneral Public License as published by
//      the Free Software Foundation; either version 2 of the License, or
//      (at your option) any later version.
//      
//      This program isdistributed 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
//      GNUGeneral 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) {
   charstring[255];
   int i = 0;
    
   clear();
   printf("Entre com a palavra: ");
   fgets(string);
   fgets(string);
   lowercase(string);
   for (; string != '{FONTE}'; i++) {...
tracking img