⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 decrypto.cpp

📁 使用XOR算法进行加解密
💻 CPP
字号:

#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>

void Decrypt(char *file2)
   {
   	int decrypto;
      char x;
      ifstream in_file;
      ofstream out_file;
      in_file.open(file2);
      if(in_file.fail())
      {
      	cout <<"\nError opening the file"<<file2
         <<"check that the file currently exists."<<endl;
         exit(1);
      }
      cout <<"Enter a name for the Decrypted file:";
      cin  >>file2;
      out_file.open(file2);
      in_file.get (x);
      if (in_file.eof())
      	return;
      while (x !=EOF)
      {
      decrypto=x+0xFACA+0xFACA;
      out_file<<(char)decrypto;
      in_file.get (x);
      if (in_file.eof())
      	break;
      }
      in_file.close();
      out_file.close();
      return;
	}

int main()
{
	const int MAXLENGHT=25;
   char file2[MAXLENGHT];
   ifstream in_file;
   cout <<"Enter the name of the file you wish to Decrypt:";
   cin >>file2;
   Decrypt(file2);
}

⌨️ 快捷键说明

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