谁会写脚本? 帮我写个苍天对练的脚本,谢天谢地了!

来源:百度知道 编辑:UC知道 时间:2024/05/23 18:42:41
谁有现成的也可以啦!在线等!

// blowfish.cpp C++ class implementation of the BLOWFISH encryption algorithm
  // _THE BLOWFISH ENCRYPTION ALGORITHM_
  // by Bruce Schneier
  // Revised code--3/20/94
  // Converted to C++ class 5/96, Jim Conger
  //
  // modify H.Shirouzu 07/2002 (add change_order(), CBC mode)

  #include <string.h>
  #include "blowfish.h"
  #include "blowfish.h2" // holds the random digit tables

  #define S(x,i) (SBoxes[i][x.w.byte##i])
  #define bf_F(x) (((S(x,0) + S(x,1)) ^ S(x,2)) + S(x,3))
  #define ROUND(a,b,n) (a.dword ^= bf_F(b) ^ PArray[n])

  CBlowFish::CBlowFish ()
  {
  PArray = new DWORD [18];
  SBoxes = new DWORD [4][256];
  }

  CBlowFish::~CBlowFish ()
  {
  delete [] SBoxes;
  delete [] PArray;
  }

  // the low level (private) encryption function
  void CBlowFish::Blowfish_encipher(DWORD *xl, DWORD *xr)