ir chat.h

来自「windows mobile下的DES加密解密源代码。通过本代码可以了解smar」· C头文件 代码 · 共 29 行

H
29
字号
#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 + =
减小字号Ctrl + -
显示快捷键?