bc_des.h

来自「加密解密,安全工具!很有意思的代码」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef __BC_DES
#define __BC_DES

#include "bc_types.h"
#define DES_ECB_ENCRYPT 0
#define DES_ECB_DECRYPT 1

/******* Exported functions *********/

#define KEY_LENGTH_DES          (64)
#define KEY_LENGTH_EXTENDED_DES (128*8)

BOOL
DES_KeyExtend( PUCHAR KeySource,          // 8       8-bit  uchars
               PDWORD KeyDestination );   // (128/4) 32-bit dwords


//
// Declaration of DES in ECB mode, necessary to:
// 1) test the DES implementation;
// 2) create Tripple DES implementation.
//

void DES_ECB_mode( BYTE  *Input,       /* 8 bytes of input data              */
                   BYTE  *Output,      /* 8 bytes of output data             */
                   DWORD *KeySchedule, /* [16][2] array of DWORDs            */ 
                   BYTE  Operation);    /* DES_ECB_ENCRYPT or DES_ECB_DECRYPT */


#endif

⌨️ 快捷键说明

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