cryptit.c

来自「This project demonstrates the use of sec」· C语言 代码 · 共 84 行

C
84
字号

//  Implementation of Secure Hash Fuctions for File
//  Encryption and Decryption

#include<stdio.h>
#include<conio.h>
#include <dir.h>
#include<ctype.h>
#include<shapes.h>
// This is my own header file where definitions for many draw functions
// such as fillarea(),drawwindow() are present.
#include<password.h>
// This is where definition for getpassword() is there
#include<welcmscr.h>
// Definition of dispwelcome() is here

#include<mymenu.h>
// Definition of menu()
#include<filedets.h>
// Definition of showfile()
#include<encrypt.h>
// Definition of encrypt()
#include<decrypt.h>

#include<dos.h>
#include<time.h>
#include <fcntl.h>
#include <io.h>
#include<stdlib.h>
#include<filelist.h>
#include<viewfile.h>


void main()
{

   int choice;
   char* itmlist[]={" View Files ", " Encrypt Files "," Decrypt Files " ," About Project "," Exit "};

   strcpy(dirpath,"");
   strcpy(temppath,"");
   strcpy(tpath,"");
   strcpy(tfile,"");
   strcpy(tempfname,"");

   dispwelcome();

  do
  {
    if (chmod("init.exe", 1) != 0)
    {
      printf("\n\n\n\n\n\nUnable to run Initialization File. \nPlease check the presence of init.exe in the current directory!");
      getch();
      exit(1);
    }

    choice=menu(31,8,5,itmlist);
    switch(choice)
    {
       case(0):
       viewfiles();break;
     case(1):
       encrypt();break;
     case(2):
       decrypt(); break;
     case(3):
       showfile("aboutprj.txt");break;
     case(4):
       break;
    }
 }while(choice<4);

  dispwelcome();
  getch();
  textcolor(LIGHTGRAY);
  textbackground(BLACK);
  system("del *.tmp");
  clrscr();
  _setcursortype(_NORMALCURSOR);

}  // end of main.

////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?