dummy.c

来自「BestCrypt开源加密原代码」· C语言 代码 · 共 53 行

C
53
字号
  /*    *  The DUMMY algorithm driver does NOT encrypt data, it only copies data   *  from SrcBuffer (source buffer) to DstBuffer (destination buffer).   *   *  You may insert your own encryption algorithm implementation to the    *  procedure, as well as your own Initial Vector calculation which    *  may be based on the IVector calculations made by other modules    *  of BestCrypt. Everything will work correctly, because the algorithm    *  driver is the only module in BestCrypt responsible for encryption.   */#include "bc_types.h"/*#ifndef __WIN95__#include <windef.h>#else#include <basedef.h>#endif*/#include "bc_dummy.h"VOIDEncrypt( DWORD *IVector,          DWORD *KeyAddress,         DWORD *SrcBuffer,         DWORD *DstBuffer,         DWORD Length )    // in bytes{   DWORD i, lengthDword = Length >> 2;  for ( i=0; i < lengthDword; i++) DstBuffer[i] = SrcBuffer[i];}VOIDDecrypt( DWORD *IVector,          DWORD *KeyAddress,         DWORD *SrcBuffer,         DWORD *DstBuffer,         DWORD Length )    // in bytes{  DWORD i, lengthDword = Length >> 2;  for ( i=0; i < lengthDword; i++) DstBuffer[i] = SrcBuffer[i];}BOOLKeyExtend( PUCHAR KeySource,           PDWORD KeyDestination ){  return TRUE;}

⌨️ 快捷键说明

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