int CEncrypt::encdec(void *data, unsigned int nLen, bool enc) { if (ENCDEC_NONE==method) return -1; if (ENCDEC_DES==method) return encdec_des((unsigned char *)data, nLen, enc); if (ENCDEC_RC5==method) return encdec_rc5((unsigned char *)data, nLen, enc); return -2; }
int CEncrypt::encdec(void *data,DWORD nLen,bool enc) { switch(method) { case ENCDEC_NONE: return -1; case ENCDEC_DES: return encdec_des((BYTE*)data,nLen,enc); case ENCDEC_RC5: return encdec_rc5((BYTE*)data,nLen,enc); } return -2; }
SWORD Enctrypt::encdec(void *data,DWORD len,bool enc) { if(ENCDEC_NONE == method) { return -1; } if(ENCDEC_DES == method) { return encdec_des((BYTE*)data,len,enc); } if(ENCDEC_RC5 == method) { return encdec_rc5((BYTE*)data,len,enc)); } if(ENCDEC_IPP == method) { return encdec_des_ipp((BYTE*)data,len,enc); } return -2; }