📄 main.cpp
字号:
//#include "iostream.h"
#include <fstream>
//#include "DSPDesEncryption.hpp"
#include "test.h"
#include "base64.hpp"
using namespace std;
//using namespace DSPDESService;
using namespace Test1;using namespace Base64ENCRYPT;
int main(void)
{
/*base64 a;
char test[] = {"<"};
char *out;
char *out1;
out = a.base64_encode(test);
printf("%d",test);
//cout << "out : " << out << endl;
out1 = a.base64_decode(out);
//cout << "out1 : " << out1 << endl;
ofstream ofs("C:\\wd.txt");
ofs.write(out,strlen(out));
ofs.write("\n",strlen("\n"));
ofs.write(out1,strlen(out1));
ofs.close();*/
//bool testB;
//string wd = "/home/wd/cc.h";
// testB = DSPDiskFileAccess::DeleteFile(wd);
// if (testB)
// printf("true\n");
// else
// printf("false\n");
// // long lspace;// lspace = DSPDiskFileAccess::GetDiskTotalSpace();/// printf("111:%d\n", lspace);// printf("%d\n", DSPDiskFileAccess::GetDiskFreeSpace());//DSPDesEncryption aa;//bool testDES= false;
//char inchar[13] = {'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 't', 'e', 's', 't'}; //char outchar[64];//=tempout ; //long datalen =13;
//const char key[8] = {'d', 's', 'p', 's', 'e', 't', 'b', 'x'};
//int keylen =8;
// bool type =ENCRYPT;
//char outC[64];//char outC1[128];//aa.des_transfer( outchar, inchar, datalen,key, keylen, type );//aa.des_transfer( outC, outchar, datalen,key, keylen, DECRYPT );
//char inchar1[13] = {'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 't', 'e', 's', 't'};/*char inchar1[] = {" <appender name=\"STDOUT\" class=\"org.apache.log4j.FileAppender\">"};
char outchar1[64];
char outC1[128];int datalen = sizeof(inchar1);
cout << datalen << endl;testDES = aa.Encrypt(outchar1, inchar1, datalen);testDES = aa.Decrypt(outC1, outchar1, datalen);cout<<"outchar4:"<<outchar1<<"\n"<<endl;cout<<"out2cha4:"<<outC1<<"\n"<<endl;
*/
/*DSPDesEncryption aa;char inchar1[10] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '\0'};
char outchar1[64];
aa.Encrypt(outchar1, inchar1, 10);*/
test a;
/*ifstream fin1;
fin1.open("c:\\test1.txt");
char newLinword[512];
int dataLen = sizeof(newLinword);
int wordLen;
while (!fin1.eof())
{
fin1.read(newLinword, dataLen);
cout<<newLinword<<endl;
wordLen = strlen(newLinword);
cout << "wordlen : " << wordLen << endl;
}
fin1.close();
ofstream ofs("C:\\zz.txt");
//cout <<"writeWord: " << writeWord << endl;
char inchar[2] = {'w','d'};
int datalen = sizeof(inchar);
char temp[4];
itoa(datalen, temp, 10);
cout << strlen(temp) << endl;
ofs.write(temp,strlen(temp));
ofs.write(inchar,datalen);
ofs.close();
char cs[]="123 ";
int i;
i = atoi(cs);
cout << i << endl;*/
//char c;
//cin >> c;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -