?? usemars.cpp
字號:
// usemars.cpp : Defines the entry point for the console application.
// 使用IBM的MRAS加密算法,本算法是塊加密入16個字節,出16個字節
//
#include "stdafx.h"
int main(int argc, char* argv[])
{
char *key="this is test";
char info1[17],info2[17];
sprintf(info1,"這是測試12345678");
info1[16]=0;
mars testm;
testm.set_key((unsigned char *)key,12);
testm.decrypt((unsigned char *)info1,(unsigned char *)info2);
info2[16]=0;
printf("decrypt \ninfo1=%s\ninfo2=%s \n",info1,info2);
testm.encrypt((unsigned char *)info2,(unsigned char *)info1);
info1[16]=0;
printf("encrypt \ninfo1=%s\ninfo2=%s \n",info1,info2);
printf("Hello s World!\n");
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -