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

📄 ir chat.h

📁 windows mobile下的DES加密解密源代码。通过本代码可以了解smartphone的编程方式以及DES算法的基本原理。
💻 H
字号:
#include "resource.h"

#define dim(x) (sizeof(x) / sizeof(x[0]))
#define LPCMDLINE LPWSTR
#define MyCreateThread CreateThread

typedef bool    (*PSubKey)[16][48];

HWND InitDialog(HWND hwnd);
BOOL ShowMenubar(HWND hwnd,int menuid);
BOOL OverrideBackKey(HWND hwnd);

BOOL CALLBACK Main_DlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp);

void Add2List (HWND hWnd, LPTSTR lpszFormat, ...);
void MySetWindowText (HWND hWnd, LPTSTR lpszFormat, ...);

bool Des_Go(char *Out,char *In,long datalen,const char *Key,int keylen, bool Type);
static void DES(char Out[8], char In[8], const PSubKey pSubKey, bool Type);//标准DES加/解密
static void SetKey(const char* Key, int len);// 设置密钥
static void SetSubKey(PSubKey pSubKey, const char Key[8]);// 设置子密钥
static void F_func(bool In[32], const bool Ki[48]);// f 函数
static void S_func(bool Out[32], const bool In[48]);// S 盒代替
static void Transform(bool *Out, bool *In, const char *Table, int len);// 变换
static void Xor(bool *InA, const bool *InB, int len);// 异或
static void RotateL(bool *In, int len, int loop);// 循环左移
static void ByteToBit(bool *Out, const char *In, int bits);// 字节组转换成位组
static void BitToByte(char *Out, const bool *In, int bits);// 位组转换成字节组

⌨️ 快捷键说明

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