encrypt.h
来自「使用VC编程实现DES的加密与解密算法」· C头文件 代码 · 共 26 行
H
26 行
class Encrypt
{
public:
Encrypt();
virtual ~Encrypt();
void Des_Encrypt(char out[8],char in[8],bool subkey[16][48]);
void Des_Decrypt(char out[8],char in[8],bool subkey[16][48]);
void Des_CreateSubkey(const char key[8],bool subkey[16][48]);
void Des_f(bool in[32], bool subkey[48]);
void Des_s(bool out[32],const bool in[48]);
void Table_Transform(bool *out,bool *in,const char *Table,int len);
void Xor(bool *a,bool *b,int len);
void Shift_left(bool *in,int len,int loop);
void ByteToBit(bool *out,const char *in,int len);
void BitToByte(char *out,const bool *in,int len);
protected:
const static char Table_IP[64];
const static char Table_IPR[64];
const static char Table_E[48];
const static char Table_P[32];
const static char Table_PC1[56];
const static char Table_PC2[48];
const static char Table_LS[16];
const static char Sbox[8][4][16];
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?